branchio

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 14 Imported by: 0

README

Branch.io SDK GO (Unofficial)

Build Status codecov Go Report Card Release License

Description

Unofficial Branch.io API Client for Go

API documentation

https://help.branch.io/developers-hub/docs/daily-exports

Download

go get -u github.com/kachit/branch-sdk-go
package main

import (
	"fmt"
	branchio_sdk "github.com/kachit/branch-sdk-go"
	"time"
)

func main(){
        cfg := branchio_sdk.NewConfig("key_live", "secret_live")
        client := branchio_sdk.NewClientFromConfig(cfg, nil)
        now := time.Date(2021, 1, 30, 0, 0, 0, 0, time.Local)
        response, err := client.Export().GetEventOntology(now)
}

Documentation

Index

Constants

View Source
const CustomDateFormatDefault = "2006-01-02"
View Source
const CustomDateFormatSlash = "01/02/2006"
View Source
const CustomTimestampFormatDefault = "2006-01-02 15:04:05-0700"
View Source
const ProdAPIUrl = "https://api2.branch.io"

Variables

This section is empty.

Functions

func NewDefaultHttpClient

func NewDefaultHttpClient() *http.Client

Types

type CSV

type CSV struct {
}

Csv unmarshaler

func (*CSV) NewCSVReader

func (c *CSV) NewCSVReader(in io.Reader) gocsv.CSVReader

Create new CSV reader for unmarshaler

func (*CSV) Unmarshal

func (c *CSV) Unmarshal(in []byte, out interface{}) error

Unmarshal raw data to Reports structs

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClientFromConfig

func NewClientFromConfig(config *Config, cl *http.Client) *Client

func (*Client) Export

func (c *Client) Export() *ExportResource

type Config

type Config struct {
	AppId  string
	Uri    string
	Key    string
	Secret string
}

Common config

func NewConfig

func NewConfig(key string, secret string) *Config

Create new config from credentials

type CustomBoolean

type CustomBoolean struct {
	Boolean bool
}

Custom boolean type

func (*CustomBoolean) MarshalJSON

func (cb *CustomBoolean) MarshalJSON() ([]byte, error)

Custom boolean MarshalJSON

func (*CustomBoolean) UnmarshalCSV

func (cb *CustomBoolean) UnmarshalCSV(csv string) error

Custom boolean UnmarshalCSV

func (*CustomBoolean) Value

func (cb *CustomBoolean) Value() bool

Custom boolean get value

type CustomDate

type CustomDate struct {
	Date time.Time
}

Custom date type

func (*CustomDate) MarshalJSON

func (ct *CustomDate) MarshalJSON() ([]byte, error)

Custom date MarshalJSON

func (*CustomDate) UnmarshalCSV

func (ct *CustomDate) UnmarshalCSV(csv string) error

Custom date UnmarshalCSV

func (*CustomDate) Value

func (ct *CustomDate) Value() time.Time

Custom date get value

type CustomFloat64

type CustomFloat64 struct {
	Float64 float64
}

Custom float type

func (*CustomFloat64) MarshalJSON

func (cf *CustomFloat64) MarshalJSON() ([]byte, error)

Custom float MarshalJSON

func (*CustomFloat64) UnmarshalCSV

func (cf *CustomFloat64) UnmarshalCSV(csv string) error

Custom float UnmarshalCSV

func (*CustomFloat64) Value

func (cf *CustomFloat64) Value() float64

Custom float get value

type CustomInteger

type CustomInteger struct {
	Integer int
}

Custom integer type

func (*CustomInteger) MarshalJSON

func (ci *CustomInteger) MarshalJSON() ([]byte, error)

Custom integer MarshalJSON

func (*CustomInteger) UnmarshalCSV

func (ci *CustomInteger) UnmarshalCSV(csv string) error

Custom integer UnmarshalCSV

func (*CustomInteger) Value

func (ci *CustomInteger) Value() int

Custom integer get value

type CustomTimestamp

type CustomTimestamp struct {
	Timestamp time.Time
}

Custom timestamp type

func (*CustomTimestamp) MarshalJSON

func (ct *CustomTimestamp) MarshalJSON() ([]byte, error)

Custom timestamp MarshalJSON

func (*CustomTimestamp) UnmarshalCSV

func (ct *CustomTimestamp) UnmarshalCSV(csv string) error

Custom timestamp UnmarshalCSV

func (*CustomTimestamp) Value

func (ct *CustomTimestamp) Value() time.Time

Custom timestamp get value

type Event

type Event struct {
	Id                                                 CustomInteger   `csv:"id" json:"id"`
	Name                                               string          `csv:"name" json:"name"`
	Timestamp                                          CustomInteger   `csv:"timestamp" json:"timestamp"`
	TimestampISO                                       CustomTimestamp `csv:"timestamp_iso" json:"timestamp_iso"`
	Origin                                             string          `csv:"origin" json:"origin"`
	LastAttributedTouchType                            string          `csv:"last_attributed_touch_type" json:"last_attributed_touch_type"`
	LastAttributedTouchTimestamp                       string          `csv:"last_attributed_touch_timestamp" json:"last_attributed_touch_timestamp"`
	LastAttributedTouchTimestampIso                    string          `csv:"last_attributed_touch_timestamp_iso" json:"last_attributed_touch_timestamp_iso"`
	LastAttributedTouchDataTildeId                     CustomInteger   `csv:"last_attributed_touch_data_tilde_id" json:"last_attributed_touch_data_tilde_id"`
	LastAttributedTouchDataTildeCampaign               string          `csv:"last_attributed_touch_data_tilde_campaign" json:"last_attributed_touch_data_tilde_campaign"`
	LastAttributedTouchDataTildeCampaignId             string          `csv:"last_attributed_touch_data_tilde_campaign_id" json:"last_attributed_touch_data_tilde_campaign_id"`
	LastAttributedTouchDataTildeChannel                string          `csv:"last_attributed_touch_data_tilde_channel" json:"last_attributed_touch_data_tilde_channel"`
	LastAttributedTouchDataTildeFeature                string          `csv:"last_attributed_touch_data_tilde_feature" json:"last_attributed_touch_data_tilde_feature"`
	LastAttributedTouchDataTildeStage                  string          `csv:"last_attributed_touch_data_tilde_stage" json:"last_attributed_touch_data_tilde_stage"`
	LastAttributedTouchDataTildeTags                   string          `csv:"last_attributed_touch_data_tilde_tags" json:"last_attributed_touch_data_tilde_tags"`
	LastAttributedTouchDataTildeAdvertisingPartnerName string          `` /* 128-byte string literal not displayed */
	LastAttributedTouchDataTildeSecondaryPublisher     string          `csv:"last_attributed_touch_data_tilde_secondary_publisher" json:"last_attributed_touch_data_tilde_secondary_publisher"`
	LastAttributedTouchDataTildeCreativeName           string          `csv:"last_attributed_touch_data_tilde_creative_name" json:"last_attributed_touch_data_tilde_creative_name"`
	LastAttributedTouchDataTildeCreativeId             string          `csv:"last_attributed_touch_data_tilde_creative_id" json:"last_attributed_touch_data_tilde_creative_id"`
	LastAttributedTouchDataTildeAdSetName              string          `csv:"last_attributed_touch_data_tilde_ad_set_name" json:"last_attributed_touch_data_tilde_ad_set_name"`
	LastAttributedTouchDataTildeAdSetId                string          `csv:"last_attributed_touch_data_tilde_ad_set_id" json:"last_attributed_touch_data_tilde_ad_set_id"`
	LastAttributedTouchDataTildeAdName                 string          `csv:"last_attributed_touch_data_tilde_ad_name" json:"last_attributed_touch_data_tilde_ad_name"`
	LastAttributedTouchDataTildeAdId                   string          `csv:"last_attributed_touch_data_tilde_ad_id" json:"last_attributed_touch_data_tilde_ad_id"`
	LastAttributedTouchDataTildeBranchAdFormat         string          `csv:"last_attributed_touch_data_tilde_branch_ad_format" json:"last_attributed_touch_data_tilde_branch_ad_format"`
	LastAttributedTouchDataTildeTechnologyPartner      string          `csv:"last_attributed_touch_data_tilde_technology_partner" json:"last_attributed_touch_data_tilde_technology_partner"`
	LastAttributedTouchDataTildeBannerDimensions       string          `csv:"last_attributed_touch_data_tilde_banner_dimensions" json:"last_attributed_touch_data_tilde_banner_dimensions"`
	LastAttributedTouchDataTildePlacement              string          `csv:"last_attributed_touch_data_tilde_placement" json:"last_attributed_touch_data_tilde_placement"`
	LastAttributedTouchDataTildeKeywordId              string          `csv:"last_attributed_touch_data_tilde_keyword_id" json:"last_attributed_touch_data_tilde_keyword_id"`
	LastAttributedTouchDataTildeAgency                 string          `csv:"last_attributed_touch_data_tilde_agency" json:"last_attributed_touch_data_tilde_agency"`
	LastAttributedTouchDataTildeOptimizationModel      string          `csv:"last_attributed_touch_data_tilde_optimization_model" json:"last_attributed_touch_data_tilde_optimization_model"`
	LastAttributedTouchDataTildeSecondaryAdFormat      string          `csv:"last_attributed_touch_data_tilde_secondary_ad_format" json:"last_attributed_touch_data_tilde_secondary_ad_format"`
	LastAttributedTouchDataTildeJourneyName            string          `csv:"last_attributed_touch_data_tilde_journey_name" json:"last_attributed_touch_data_tilde_journey_name"`
	LastAttributedTouchDataTildeJourneyId              string          `csv:"last_attributed_touch_data_tilde_journey_id" json:"last_attributed_touch_data_tilde_journey_id"`
	LastAttributedTouchDataTildeViewName               string          `csv:"last_attributed_touch_data_tilde_view_name" json:"last_attributed_touch_data_tilde_view_name"`
	LastAttributedTouchDataTildeViewId                 string          `csv:"last_attributed_touch_data_tilde_view_id" json:"last_attributed_touch_data_tilde_view_id"`
	LastAttributedTouchDataPlusCurrentFeature          string          `csv:"last_attributed_touch_data_plus_current_feature" json:"last_attributed_touch_data_plus_current_feature"`
	LastAttributedTouchDataPlusViaFeatures             string          `csv:"last_attributed_touch_data_plus_via_features" json:"last_attributed_touch_data_plus_via_features"`
	LastAttributedTouchDataDollar3P                    string          `csv:"last_attributed_touch_data_dollar_3p" json:"last_attributed_touch_data_dollar_3p"`
	LastAttributedTouchDataPlusWebFormat               string          `csv:"last_attributed_touch_data_plus_web_format" json:"last_attributed_touch_data_plus_web_format"`
	LastAttributedTouchDataCustomFields                string          `csv:"last_attributed_touch_data_custom_fields" json:"last_attributed_touch_data_custom_fields"`
	DaysFromLastAttributedTouchToEvent                 string          `csv:"days_from_last_attributed_touch_to_event" json:"days_from_last_attributed_touch_to_event"`
	HoursFromLastAttributedTouchToEvent                string          `csv:"hours_from_last_attributed_touch_to_event" json:"hours_from_last_attributed_touch_to_event"`
	MinutesFromLastAttributedTouchToEvent              string          `csv:"minutes_from_last_attributed_touch_to_event" json:"minutes_from_last_attributed_touch_to_event"`
	SecondsFromLastAttributedTouchToEvent              string          `csv:"seconds_from_last_attributed_touch_to_event" json:"seconds_from_last_attributed_touch_to_event"`
	LastCtaViewTimestamp                               string          `csv:"last_cta_view_timestamp" json:"last_cta_view_timestamp"`
	LastCtaViewTimestampIso                            string          `csv:"last_cta_view_timestamp_iso" json:"last_cta_view_timestamp_iso"`
	LastCtaViewDataTildeId                             string          `csv:"last_cta_view_data_tilde_id" json:"last_cta_view_data_tilde_id"`
	LastCtaViewDataTildeCampaign                       string          `csv:"last_cta_view_data_tilde_campaign" json:"last_cta_view_data_tilde_campaign"`
	LastCtaViewDataTildeCampaignId                     string          `csv:"last_cta_view_data_tilde_campaign_id" json:"last_cta_view_data_tilde_campaign_id"`
	LastCtaViewDataTildeChannel                        string          `csv:"last_cta_view_data_tilde_channel" json:"last_cta_view_data_tilde_channel"`
	LastCtaViewDataTildeFeature                        string          `csv:"last_cta_view_data_tilde_feature" json:"last_cta_view_data_tilde_feature"`
	LastCtaViewDataTildeStage                          string          `csv:"last_cta_view_data_tilde_stage" json:"last_cta_view_data_tilde_stage"`
	LastCtaViewDataTildeTags                           string          `csv:"last_cta_view_data_tilde_tags" json:"last_cta_view_data_tilde_tags"`
	LastCtaViewDataTildeAdvertisingPartnerName         string          `csv:"last_cta_view_data_tilde_advertising_partner_name" json:"last_cta_view_data_tilde_advertising_partner_name"`
	LastCtaViewDataTildeSecondaryPublisher             string          `csv:"last_cta_view_data_tilde_secondary_publisher" json:"last_cta_view_data_tilde_secondary_publisher"`
	LastCtaViewDataTildeCreativeName                   string          `csv:"last_cta_view_data_tilde_creative_name" json:"last_cta_view_data_tilde_creative_name"`
	LastCtaViewDataTildeCreativeId                     string          `csv:"last_cta_view_data_tilde_creative_id" json:"last_cta_view_data_tilde_creative_id"`
	LastCtaViewDataTildeAdSetName                      string          `csv:"last_cta_view_data_tilde_ad_set_name" json:"last_cta_view_data_tilde_ad_set_name"`
	LastCtaViewDataTildeAdSetId                        string          `csv:"last_cta_view_data_tilde_ad_set_id" json:"last_cta_view_data_tilde_ad_set_id"`
	LastCtaViewDataTildeAdName                         string          `csv:"last_cta_view_data_tilde_ad_name" json:"last_cta_view_data_tilde_ad_name"`
	LastCtaViewDataTildeAdId                           string          `csv:"last_cta_view_data_tilde_ad_id" json:"last_cta_view_data_tilde_ad_id"`
	LastCtaViewDataTildeBranchAdFormat                 string          `csv:"last_cta_view_data_tilde_branch_ad_format" json:"last_cta_view_data_tilde_branch_ad_format"`
	LastCtaViewDataTildeTechnologyPartner              string          `csv:"last_cta_view_data_tilde_technology_partner" json:"last_cta_view_data_tilde_technology_partner"`
	LastCtaViewDataTildeBannerDimensions               string          `csv:"last_cta_view_data_tilde_banner_dimensions" json:"last_cta_view_data_tilde_banner_dimensions"`
	LastCtaViewDataTildePlacement                      string          `csv:"last_cta_view_data_tilde_placement" json:"last_cta_view_data_tilde_placement"`
	LastCtaViewDataTildeKeywordId                      string          `csv:"last_cta_view_data_tilde_keyword_id" json:"last_cta_view_data_tilde_keyword_id"`
	LastCtaViewDataTildeAgency                         string          `csv:"last_cta_view_data_tilde_agency" json:"last_cta_view_data_tilde_agency"`
	LastCtaViewDataTildeOptimizationModel              string          `csv:"last_cta_view_data_tilde_optimization_model" json:"last_cta_view_data_tilde_optimization_model"`
	LastCtaViewDataTildeSecondaryAdFormat              string          `csv:"last_cta_view_data_tilde_secondary_ad_format" json:"last_cta_view_data_tilde_secondary_ad_format"`
	LastCtaViewDataPlusViaFeatures                     string          `csv:"last_cta_view_data_plus_via_features" json:"last_cta_view_data_plus_via_features"`
	LastCtaViewDataDollar3P                            string          `csv:"last_cta_view_data_dollar_3p" json:"last_cta_view_data_dollar_3p"`
	LastCtaViewDataPlusWebFormat                       string          `csv:"last_cta_view_data_plus_web_format" json:"last_cta_view_data_plus_web_format"`
	LastCtaViewDataCustomFields                        string          `csv:"last_cta_view_data_custom_fields" json:"last_cta_view_data_custom_fields"`
	DeepLinked                                         string          `csv:"deep_linked" json:"deep_linked"`
	FirstEventForUser                                  string          `csv:"first_event_for_user" json:"first_event_for_user"`
	UserDataOs                                         string          `csv:"user_data_os" json:"user_data_os"`
	UserDataOsVersion                                  string          `csv:"user_data_os_version" json:"user_data_os_version"`
	UserDataModel                                      string          `csv:"user_data_model" json:"user_data_model"`
	UserDataBrowser                                    string          `csv:"user_data_browser" json:"user_data_browser"`
	UserDataGeoCountryCode                             string          `csv:"user_data_geo_country_code" json:"user_data_geo_country_code"`
	UserDataAppVersion                                 string          `csv:"user_data_app_version" json:"user_data_app_version"`
	UserDataSdkVersion                                 string          `csv:"user_data_sdk_version" json:"user_data_sdk_version"`
	UserDataGeoDmaCode                                 string          `csv:"user_data_geo_dma_code" json:"user_data_geo_dma_code"`
	UserDataEnvironment                                string          `csv:"user_data_environment" json:"user_data_environment"`
	UserDataPlatform                                   string          `csv:"user_data_platform" json:"user_data_platform"`
	UserDataAaid                                       string          `csv:"user_data_aaid" json:"user_data_aaid"`
	UserDataIdfa                                       string          `csv:"user_data_idfa" json:"user_data_idfa"`
	UserDataIdfv                                       string          `csv:"user_data_idfv" json:"user_data_idfv"`
	UserDataAndroidId                                  string          `csv:"user_data_android_id" json:"user_data_android_id"`
	UserDataLimitAdTracking                            string          `csv:"user_data_limit_ad_tracking" json:"user_data_limit_ad_tracking"`
	UserDataUserAgent                                  string          `csv:"user_data_user_agent" json:"user_data_user_agent"`
	UserDataIp                                         string          `csv:"user_data_ip" json:"user_data_ip"`
	UserDataDeveloperIdentity                          string          `csv:"user_data_developer_identity" json:"user_data_developer_identity"`
	UserDataLanguage                                   string          `csv:"user_data_language" json:"user_data_language"`
	UserDataBrand                                      string          `csv:"user_data_brand" json:"user_data_brand"`
	DiMatchClickToken                                  CustomInteger   `csv:"di_match_click_token" json:"di_match_click_token"`
	EventDataRevenueInUsd                              string          `csv:"event_data_revenue_in_usd" json:"event_data_revenue_in_usd"`
	EventDataExchangeRate                              string          `csv:"event_data_exchange_rate" json:"event_data_exchange_rate"`
	EventDataTransactionId                             string          `csv:"event_data_transaction_id" json:"event_data_transaction_id"`
	EventDataRevenue                                   string          `csv:"event_data_revenue" json:"event_data_revenue"`
	EventDataCurrency                                  string          `csv:"event_data_currency" json:"event_data_currency"`
	EventDataShipping                                  string          `csv:"event_data_shipping" json:"event_data_shipping"`
	EventDataTax                                       string          `csv:"event_data_tax" json:"event_data_tax"`
	EventDataCoupon                                    string          `csv:"event_data_coupon" json:"event_data_coupon"`
	EventDataAffiliation                               string          `csv:"event_data_affiliation" json:"event_data_affiliation"`
	EventDataSearchQuery                               string          `csv:"event_data_search_query" json:"event_data_search_query"`
	EventDataDescription                               string          `csv:"event_data_description" json:"event_data_description"`
	CustomData                                         string          `csv:"custom_data" json:"custom_data"`
	LastAttributedTouchDataTildeKeyword                string          `csv:"last_attributed_touch_data_tilde_keyword" json:"last_attributed_touch_data_tilde_keyword"`
	UserDataCrossPlatformId                            string          `csv:"user_data_cross_platform_id" json:"user_data_cross_platform_id"`
	UserDataPastCrossPlatformIds                       string          `csv:"user_data_past_cross_platform_ids" json:"user_data_past_cross_platform_ids"`
	UserDataProbCrossPlatformIds                       string          `csv:"user_data_prob_cross_platform_ids" json:"user_data_prob_cross_platform_ids"`
	StoreInstallBeginTimestamp                         string          `csv:"store_install_begin_timestamp" json:"store_install_begin_timestamp"`
	ReferrerClickTimestamp                             string          `csv:"referrer_click_timestamp" json:"referrer_click_timestamp"`
	UserDataOsVersionAndroid                           string          `csv:"user_data_os_version_android" json:"user_data_os_version_android"`
	UserDataGeoCityCode                                string          `csv:"user_data_geo_city_code" json:"user_data_geo_city_code"`
	UserDataGeoCityEn                                  string          `csv:"user_data_geo_city_en" json:"user_data_geo_city_en"`
	UserDataHttpReferrer                               string          `csv:"user_data_http_referrer" json:"user_data_http_referrer"`
	EventTimestamp                                     CustomInteger   `csv:"event_timestamp" json:"event_timestamp"`
	CustomerEventAlias                                 string          `csv:"customer_event_alias" json:"customer_event_alias"`
	LastAttributedTouchDataTildeCustomerCampaign       string          `csv:"last_attributed_touch_data_tilde_customer_campaign" json:"last_attributed_touch_data_tilde_customer_campaign"`
	LastAttributedTouchDataTildeCampaignType           string          `csv:"last_attributed_touch_data_tilde_campaign_type" json:"last_attributed_touch_data_tilde_campaign_type"`
	LastCtaViewDataTildeCampaignType                   string          `csv:"last_cta_view_data_tilde_campaign_type" json:"last_cta_view_data_tilde_campaign_type"`
	LastAttributedTouchDataTildeAgencyId               string          `csv:"last_attributed_touch_data_tilde_agency_id" json:"last_attributed_touch_data_tilde_agency_id"`
	LastAttributedTouchDataPlusTouchId                 string          `csv:"last_attributed_touch_data_plus_touch_id" json:"last_attributed_touch_data_plus_touch_id"`
	LastCtaViewDataPlusTouchId                         string          `csv:"last_cta_view_data_plus_touch_id" json:"last_cta_view_data_plus_touch_id"`
	UserDataInstallerPackageName                       string          `csv:"user_data_installer_package_name" json:"user_data_installer_package_name"`
	UserDataCpuType                                    string          `csv:"user_data_cpu_type" json:"user_data_cpu_type"`
	UserDataScreenWidth                                string          `csv:"user_data_screen_width" json:"user_data_screen_width"`
	UserDataScreenHeight                               string          `csv:"user_data_screen_height" json:"user_data_screen_height"`
	UserDataBuild                                      string          `csv:"user_data_build" json:"user_data_build"`
	UserDataInternetConnectionType                     string          `csv:"user_data_internet_connection_type" json:"user_data_internet_connection_type"`
	HashVersion                                        string          `csv:"hash_version" json:"hash_version"`
}

type EventOntology

type EventOntology struct {
	Click         []string `json:"eo_click"`
	CommerceEvent []string `json:"eo_commerce_event"`
	CustomEvent   []string `json:"eo_custom_event"`
	Install       []string `json:"eo_install"`
	Open          []string `json:"eo_open"`
	Reinstall     []string `json:"eo_reinstall"`
}

type ExportResource

type ExportResource struct {
	*ResourceAbstract
}

func (*ExportResource) GetEventData

func (r *ExportResource) GetEventData(link string) (*Response, error)

*

  • @unmarshal Event

func (*ExportResource) GetEventOntology

func (r *ExportResource) GetEventOntology(date time.Time) (*Response, error)

*

  • @unmarshal EventOntology

type RequestBuilder

type RequestBuilder struct {
	// contains filtered or unexported fields
}

type ResourceAbstract

type ResourceAbstract struct {
	// contains filtered or unexported fields
}

func NewResourceAbstract

func NewResourceAbstract(transport *Transport) *ResourceAbstract

func (*ResourceAbstract) Get

func (r *ResourceAbstract) Get(path string, query map[string]interface{}) (*Response, error)

func (*ResourceAbstract) Post

func (r *ResourceAbstract) Post(path string, body map[string]interface{}, query map[string]interface{}) (*Response, error)

type Response

type Response struct {
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse(raw *http.Response) *Response

func (*Response) GetRawBody

func (r *Response) GetRawBody() string

func (*Response) GetRawResponse

func (r *Response) GetRawResponse() *http.Response

func (*Response) IsSuccess

func (r *Response) IsSuccess() bool

func (*Response) ReadBody

func (r *Response) ReadBody() ([]byte, error)

func (*Response) ReadGzipBody

func (r *Response) ReadGzipBody() ([]byte, error)

func (*Response) Unmarshal

func (r *Response) Unmarshal(v interface{}) error

func (*Response) UnmarshalCSV

func (r *Response) UnmarshalCSV(v interface{}) error

func (*Response) UnmarshalError

func (r *Response) UnmarshalError(v interface{}) error

type Transport

type Transport struct {
	// contains filtered or unexported fields
}

func NewHttpTransport

func NewHttpTransport(config *Config, h *http.Client) *Transport

func (*Transport) Get

func (t *Transport) Get(path string, query map[string]interface{}) (resp *http.Response, err error)

func (*Transport) Post

func (t *Transport) Post(path string, body map[string]interface{}, query map[string]interface{}) (resp *http.Response, err error)

func (*Transport) Request

func (t *Transport) Request(method string, path string, query map[string]interface{}, body map[string]interface{}) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL