Documentation ¶
Overview ¶
Package bitpic interfaces with unwriter's "bitpic.network" Read more at: https://bitpic.network/about
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DefaultImage string // custom default image (if no image is found) Network = bitPicURL // override the default network UserAgent = defaultUserAgent // override the default user agent )
Override the package defaults
Functions ¶
func URL ¶ added in v0.3.2
URL will return an HTTP url for the bitpic avatar using alias and domain Specs: https://bitpic.network/about
func URLFromPaymail ¶ added in v0.3.2
URLFromPaymail will return an HTTP url for the bitpic avatar using a paymail Specs: https://bitpic.network/about
Types ¶
type Data ¶ added in v0.1.11
type Data struct { BitFs string `json:"bitfs"` Paymail string `json:"paymail"` URI string `json:"uri"` }
Data is the required bitpic information
type Meta ¶ added in v0.1.11
type Meta struct { Content string `json:"content"` Description string `json:"description"` Image string `json:"image"` Title string `json:"title"` URL string `json:"url"` }
Meta is additional information
type Post ¶ added in v0.1.11
type Post struct { CreatedAt string `json:"created_at"` Data *Data `json:"data"` Message string `json:"message"` Meta *Meta `json:"meta"` Name string `json:"name"` Tags interface{} `json:"tags"` TxID string `json:"tx_id"` }
Post is a BitPic post
type Response ¶
type Response struct { Found bool `json:"found"` // Flag if the bitpic was found StatusCode int `json:"status_code"` // Status code returned on the request Tracing resty.TraceInfo `json:"tracing"` // Trace information if enabled on the request URL string `json:"url"` // The bitpic url for the image }
Response is the standard fields returned on all responses
type SearchResponse ¶ added in v0.1.11
type SearchResponse struct { Result *SearchResult `json:"result"` // Result from BitPics StatusCode int `json:"status_code"` // Status code returned on the request Tracing resty.TraceInfo `json:"-"` // Trace information if enabled on the request }
SearchResponse is the response from /search
func Search ¶ added in v0.1.11
func Search(alias, domain string, tracing bool) (response *SearchResponse, err error)
Search will perform a search on the BitPic network https://txt.bitpic.network/search/json?text=alias@domain
type SearchResult ¶ added in v0.1.11
SearchResult is the child of the response