-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New main branch SDK doesn't use the intended user agent string format #…
…21 Incorrect links to documentation in code #23 [Removed] API Rate limiting is not handled in client #20 Refactor api client to adhere to rate limits #25
- Loading branch information
1 parent
a548f8e
commit 2d468ea
Showing
22 changed files
with
1,355 additions
and
572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,13 @@ The client could be generated with the following parameters: | |
- `baseURL`: The base URL, FQDN or IP, of the MERAKI instance. | ||
- `dashboardApiKey`: The meraki_key for access to API. | ||
- `debug`: Boolean to enable debugging | ||
- `sslVerify`: Boolean to enable or disable SSL certificate verification. | ||
- `customUserAgent`: Set Custom user agent, if is nil, default is: (golang/*) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
- `requestPerSecond`: Set request per second allowed for client, if is nil, default is: (10) | ||
|
||
```go | ||
client, err = meraki.NewClientWithOptions("https://api.meraki.com/", | ||
"MERAKI_KEY", | ||
"true", "false") | ||
"true", nil,nil) | ||
nResponse, _, err := client.Administered.GetAdministeredIDentitiesMe() | ||
if err != nil { | ||
fmt.Println(err) | ||
|
@@ -48,10 +49,10 @@ The client can be configured with the following environment variables: | |
- `MERAKI_BASE_URL`: The base URL, FQDN or IP, of the MERAKI instance. | ||
- `MERAKI_DASHBOARD_API_KEY`: The meraki_key for access to API. | ||
- `MERAKI_DEBUG`: Boolean to enable debugging | ||
- `MERAKI_SSL_VERIFY`: Boolean to enable or disable SSL certificate verification. | ||
- `MERAKI_USER_AGENT`: Custom user agent can be set. Default (golang/*) | ||
This comment has been minimized.
Sorry, something went wrong.
TKIPisalegacycipher
Contributor
|
||
|
||
```go | ||
Client, err = meraki.NewClient() | ||
Client, err = meraki.NewClient(nil) | ||
devicesCount, _, err := Client.Devices.GetDeviceCount() | ||
``` | ||
|
||
|
@@ -60,9 +61,12 @@ devicesCount, _, err := Client.Devices.GetDeviceCount() | |
Here is an example of how we can generate a client, get a device count and then a list of devices filtering them using query params. | ||
|
||
```go | ||
client, err = meraki.NewClientWithOptions("https://api.meraki.com/", | ||
"Meraki_key", | ||
"true", "false") | ||
|
||
requestPerSecond := 5 | ||
custom_user_agent := "customUA" | ||
client, err = meraki.NewClientWithOptions("https://api.meraki.com/", | ||
"APIKEY", | ||
"true", &custom_user_agent, &requestPerSecond) | ||
if err != nil { | ||
fmt.Println(err) | ||
return | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Users should not be able to override the UA in this way.