Skip to content

Commit

Permalink
Merge pull request #27 from meraki/develop
Browse files Browse the repository at this point in the history
Develop v2.0.9
  • Loading branch information
fmunozmiranda authored Mar 14, 2024
2 parents d514075 + 390b31a commit 8a7543c
Show file tree
Hide file tree
Showing 23 changed files with 1,731 additions and 621 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.9] - 2024-03-14
- 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
- `AccessPolicyNumber` was absent in response structs of `ResponseSwitchGetNetworkSwitchAccessPolicy` and `ResponseItemSwitchGetNetworkSwitchAccessPolicies`.

## [2.0.8] - 2024-03-08
- New main branch SDK doesn't use the intended user agent string format #21
- Incorrect links to documentation in code #23 [Removed]
Expand Down Expand Up @@ -1330,4 +1337,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[2.0.6]: https://github.com/meraki/dashboard-api-go/compare/v2.0.5...2.0.6
[2.0.7]: https://github.com/meraki/dashboard-api-go/compare/v2.0.6...2.0.7
[2.0.8]: https://github.com/meraki/dashboard-api-go/compare/v2.0.7...2.0.8
[Unreleased]: https://github.com/meraki/dashboard-api-go/compare/v2.0.8...main
[2.0.9]: https://github.com/meraki/dashboard-api-go/compare/v2.0.8...2.0.9
[Unreleased]: https://github.com/meraki/dashboard-api-go/compare/v2.0.9...main
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The client could be generated with the following parameters:
```go
client, err = meraki.NewClientWithOptions("https://api.meraki.com/",
"MERAKI_KEY",
"true", "false")
"true")
nResponse, _, err := client.Administered.GetAdministeredIDentitiesMe()
if err != nil {
fmt.Println(err)
Expand Down Expand Up @@ -62,7 +62,7 @@ Here is an example of how we can generate a client, get a device count and then
```go
client, err = meraki.NewClientWithOptions("https://api.meraki.com/",
"Meraki_key",
"true", "false")
"true")
if err != nil {
fmt.Println(err)
return
Expand Down
2 changes: 1 addition & 1 deletion examples/administered/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func main() {
fmt.Println("Authenticating")
client, err = meraki.NewClientWithOptions("https://api.meraki.com/",
"12f2eb53588c75e28d89e108a05ea0c2487b08cf",
"true", "false")
"true")
if err != nil {
fmt.Println(err)
return
Expand Down
2 changes: 1 addition & 1 deletion examples/networks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func main() {
fmt.Println("Authenticating")
client, err = meraki.NewClientWithOptions("https://api.meraki.com/",
"12f2eb53588c75e28d89e108a05ea0c2487b08cf",
"true", "false")
"true")
if err != nil {
fmt.Println(err)
return
Expand Down
2 changes: 1 addition & 1 deletion examples/organizations/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func main() {
fmt.Println("Authenticating")
client, err = meraki.NewClientWithOptions("https://api.meraki.com/",
"12f2eb53588c75e28d89e108a05ea0c2487b08cf",
"true", "false")
"true")
if err != nil {
fmt.Println(err)
return
Expand Down
2 changes: 1 addition & 1 deletion examples/testPagination/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {
fmt.Println("Authenticating")
client, err = meraki.NewClientWithOptions("https://api.meraki.com/",
"12f2eb53588c75e28d89e108a05ea0c2487b08cf",
"false", "false")
"false")
if err != nil {
fmt.Println(err)
return
Expand Down
11 changes: 10 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ require (
github.com/google/go-querystring v1.1.0
)

require golang.org/x/net v0.17.0 // indirect
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
github.com/juju/ratelimit v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
golang.org/x/net v0.17.0 // indirect
gopkg.in/h2non/gock.v1 v1.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
16 changes: 16 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8=
github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/juju/ratelimit v1.0.2 h1:sRxmtRiajbvrcLQT7S+JbqU0ntsb9W2yhSdNN8tWfaI=
github.com/juju/ratelimit v1.0.2/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
Expand Down Expand Up @@ -47,3 +58,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=
gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
6 changes: 3 additions & 3 deletions sdk/administered.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ type ResponseAdministeredGetAdministeredIDentitiesMeAuthenticationTwoFactor stru
/* Returns the identity of the current user.
Documentation Link: https://developer.cisco.com/docs/dna-center/#!get-administered-identities-me
*/
*/
func (s *AdministeredService) GetAdministeredIDentitiesMe() (*ResponseAdministeredGetAdministeredIDentitiesMe, *resty.Response, error) {
path := "/api/v1/administered/identities/me"

s.rateLimiterBucket.Wait(1)
response, err := s.client.R().
SetHeader("Content-Type", "application/json").
SetHeader("Accept", "application/json").
Expand Down
Loading

0 comments on commit 8a7543c

Please sign in to comment.