Skip to content

Commit

Permalink
Merge pull request #52 from meraki/develop
Browse files Browse the repository at this point in the history
## [4.0.4] - 2025-02-17
  • Loading branch information
fmunozmiranda authored Feb 17, 2025
2 parents a590769 + 82a6192 commit 7c6854d
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.0.4] - 2025-02-17
### Fixed
- Devices.GetDeviceClients fails unmarshalling VLAN field #36.

## [4.0.3] - 2025-02-07
### Fixed
- Updating PAGINATION_PER_PAGE const.
Expand Down Expand Up @@ -1438,4 +1442,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[4.0.1]: https://github.com/meraki/dashboard-api-go/compare/v4.0.0...4.0.1
[4.0.2]: https://github.com/meraki/dashboard-api-go/compare/v4.0.1...4.0.2
[4.0.3]: https://github.com/meraki/dashboard-api-go/compare/v4.0.2...4.0.3
[4.0.4]: https://github.com/meraki/dashboard-api-go/compare/v4.0.3...4.0.4
[Unreleased]: https://github.com/meraki/dashboard-api-go/compare/v4.0.3...main
35 changes: 35 additions & 0 deletions examples/appliance/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package main

import (
"fmt"

meraki "github.com/meraki/dashboard-api-go/v4/sdk"
)

var client *meraki.Client

func main() {
var err error
fmt.Println("Authenticating")
client, err = meraki.NewClient()
if err != nil {
fmt.Println(err)
return
}

nResponse, _, err := client.Appliance.GetOrganizationApplianceVpnStatuses("828099381482762270", &meraki.GetOrganizationApplianceVpnStatusesQueryParams{
NetworkIDs: []string{"N_12345678"},
})

if err != nil {
fmt.Println(err)
return
}
if nResponse != nil {
// fmt.Println("\n Cantidad: ", len(*nResponse))
fmt.Printf("%v", *nResponse)
return
}

fmt.Println("There's no data on response")
}
33 changes: 33 additions & 0 deletions examples/devices/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package main

import (
"fmt"

meraki "github.com/meraki/dashboard-api-go/v4/sdk"
)

var client *meraki.Client

func main() {
var err error
fmt.Println("Authenticating")
client, err = meraki.NewClient()
if err != nil {
fmt.Println(err)
return
}

nResponse, _, err := client.Devices.GetDeviceClients("QBSC-ALSL-3GXN", nil)

if err != nil {
fmt.Println(err)
return
}
if nResponse != nil {
// fmt.Println("\n Cantidad: ", len(*nResponse))
fmt.Printf("%v", *nResponse)
return
}

fmt.Println("There's no data on response")
}
2 changes: 1 addition & 1 deletion sdk/devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ type ResponseItemDevicesGetDeviceClients struct {
Switchport string `json:"switchport,omitempty"` // The name of the switchport with clients on it, if the device is a switch
Usage *ResponseItemDevicesGetDeviceClientsUsage `json:"usage,omitempty"` // Client usage data for sent and received
User string `json:"user,omitempty"` // The client user's name
VLAN string `json:"vlan,omitempty"` // The client-assigned name of the VLAN the client is connected to
VLAN *int `json:"vlan,omitempty"` // The client-assigned name of the VLAN the client is connected to
}
type ResponseItemDevicesGetDeviceClientsUsage struct {
Recv *float64 `json:"recv,omitempty"` // Usage received by the client
Expand Down

0 comments on commit 7c6854d

Please sign in to comment.