mirror of
https://github.com/imjasonh/staticmaps
synced 2026-07-11 23:49:48 +00:00
remove Client struct, use context values for API key, Work client ID and private key, and http Client
This commit is contained in:
parent
9166c9bae7
commit
64ec22f709
10 changed files with 127 additions and 97 deletions
|
|
@ -48,8 +48,8 @@ const (
|
|||
)
|
||||
|
||||
// StaticMap requests a static map image of a requested size.
|
||||
func (c Client) StaticMap(ctx context.Context, s Size, opts *StaticMapOpts) (io.ReadCloser, error) {
|
||||
resp, err := c.do(ctx, baseURL+staticmap(s, opts))
|
||||
func StaticMap(ctx context.Context, s Size, opts *StaticMapOpts) (io.ReadCloser, error) {
|
||||
resp, err := do(ctx, baseURL+staticmap(s, opts))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue