Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jbogarin committed Jul 3, 2020
2 parents 056325e + 59d2ba4 commit 7e9fb55
Showing 26 changed files with 80 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/ContentsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \ContentsApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/LicensesApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \LicensesApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/MembershipsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \MembershipsApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/MessagesApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \MessagesApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/OrganizationsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \OrganizationsApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/PeopleApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \PeopleApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/RolesApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \RolesApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/RoomsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \RoomsApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/TeamMembershipsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \TeamMembershipsApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/TeamsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \TeamsApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
2 changes: 1 addition & 1 deletion docs/WebhooksApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \WebhooksApi

All URIs are relative to *https://api.ciscospark.com/v1*
All URIs are relative to *https://webexapis.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
4 changes: 4 additions & 0 deletions sdk/api_client.go
Original file line number Diff line number Diff line change
@@ -69,3 +69,7 @@ func NewClient() *Client {

return c
}

// Error indicates an error from the invocation of a Webex API. See
// the following documentation for error context: https://developer.webex.com/docs/api/basics#api-errors.
type Error struct{}
1 change: 1 addition & 0 deletions sdk/contents_api.go
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ func (s *ContentsService) GetContent(contentID string) (*resty.Response, error)
path = strings.Replace(path, "{"+"contentId"+"}", fmt.Sprintf("%v", contentID), -1)

response, err := RestyClient.R().
SetError(&Error{}).
Get(path)

if err != nil {
5 changes: 5 additions & 0 deletions sdk/devices.go
Original file line number Diff line number Diff line change
@@ -67,6 +67,7 @@ func devicesPagination(linkHeader string, size, max int) *Devices {
if l.Rel == "next" {
response, err := RestyClient.R().
SetResult(&Devices{}).
SetError(&Error{}).
Get(l.URI)

if err != nil {
@@ -108,6 +109,7 @@ func (s *DevicesService) CreateDeviceActivationCode(deviceCodeRequest *DeviceCod
response, err := RestyClient.R().
SetBody(deviceCodeRequest).
SetResult(&DeviceCode{}).
SetError(&Error{}).
Post(path)

if err != nil {
@@ -132,6 +134,7 @@ func (s *DevicesService) DeleteDevice(deviceID string) (*resty.Response, error)
path = strings.Replace(path, "{"+"deviceId"+"}", fmt.Sprintf("%v", deviceID), -1)

response, err := RestyClient.R().
SetError(&Error{}).
Delete(path)

if err != nil {
@@ -154,6 +157,7 @@ func (s *DevicesService) GetDevice(deviceID string) (*Device, *resty.Response, e

response, err := RestyClient.R().
SetResult(&Device{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -215,6 +219,7 @@ func (s *DevicesService) ListDevices(queryParams *ListDevicesQueryParams) (*Devi
response, err := RestyClient.R().
SetQueryString(queryParamsString.Encode()).
SetResult(&Devices{}).
SetError(&Error{}).
Get(path)

if err != nil {
3 changes: 3 additions & 0 deletions sdk/licenses_api.go
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ func licensesPagination(linkHeader string, size, max int) *Licenses {

response, err := RestyClient.R().
SetResult(&Licenses{}).
SetError(&Error{}).
Get(l.URI)

if err != nil {
@@ -80,6 +81,7 @@ func (s *LicensesService) GetLicense(licenseID string) (*License, *resty.Respons

response, err := RestyClient.R().
SetResult(&License{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -114,6 +116,7 @@ func (s *LicensesService) ListLicenses(queryParams *ListLicensesQueryParams) (*L
response, err := RestyClient.R().
SetQueryString(queryParamsString.Encode()).
SetResult(&Licenses{}).
SetError(&Error{}).
Get(path)

if err != nil {
6 changes: 6 additions & 0 deletions sdk/memberships_api.go
Original file line number Diff line number Diff line change
@@ -58,6 +58,7 @@ func membershipsPagination(linkHeader string, size, max int) *Memberships {

response, err := RestyClient.R().
SetResult(&Memberships{}).
SetError(&Error{}).
Get(l.URI)

if err != nil {
@@ -97,6 +98,7 @@ func (s *MembershipsService) CreateMembership(membershipCreateRequest *Membershi
response, err := RestyClient.R().
SetBody(membershipCreateRequest).
SetResult(&Membership{}).
SetError(&Error{}).
Post(path)

if err != nil {
@@ -121,6 +123,7 @@ func (s *MembershipsService) DeleteMembership(membershipID string) (*resty.Respo
path = strings.Replace(path, "{"+"membershipId"+"}", fmt.Sprintf("%v", membershipID), -1)

response, err := RestyClient.R().
SetError(&Error{}).
Delete(path)

if err != nil {
@@ -145,6 +148,7 @@ func (s *MembershipsService) GetMembership(membershipID string) (*Membership, *r

response, err := RestyClient.R().
SetResult(&Membership{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -188,6 +192,7 @@ func (s *MembershipsService) ListMemberships(queryParams *ListMembershipsQueryPa
response, err := RestyClient.R().
SetQueryString(queryParamsString.Encode()).
SetResult(&Memberships{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -229,6 +234,7 @@ func (s *MembershipsService) UpdateMembership(membershipID string, membershipUpd
response, err := RestyClient.R().
SetBody(membershipUpdateRequest).
SetResult(&Membership{}).
SetError(&Error{}).
Put(path)

if err != nil {
6 changes: 6 additions & 0 deletions sdk/messages_api.go
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ type Message struct {
ToPersonEmail string `json:"toPersonEmail,omitempty"` // Person email (for type=direct).
Text string `json:"text,omitempty"` // Message in plain text format.
Markdown string `json:"markdown,omitempty"` // Message in markdown format.
Html string `json:"html,omitempty"` // Message in HTML format.
Files []string `json:"files,omitempty"` // File URL array.
PersonID string `json:"personId,omitempty"` // Person ID.
PersonEmail string `json:"personEmail,omitempty"` // Person Email.
@@ -59,6 +60,7 @@ func messagesPagination(linkHeader string, size, max int) *Messages {

response, err := RestyClient.R().
SetResult(&Messages{}).
SetError(&Error{}).
Get(l.URI)

if err != nil {
@@ -100,6 +102,7 @@ func (s *MessagesService) CreateMessage(messageCreateRequest *MessageCreateReque
response, err := RestyClient.R().
SetBody(messageCreateRequest).
SetResult(&Message{}).
SetError(&Error{}).
Post(path)

if err != nil {
@@ -122,6 +125,7 @@ func (s *MessagesService) DeleteMessage(messageID string) (*resty.Response, erro
path = strings.Replace(path, "{"+"messageId"+"}", fmt.Sprintf("%v", messageID), -1)

response, err := RestyClient.R().
SetError(&Error{}).
Delete(path)

if err != nil {
@@ -146,6 +150,7 @@ func (s *MessagesService) GetMessage(messageID string) (*Message, *resty.Respons

response, err := RestyClient.R().
SetResult(&Message{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -189,6 +194,7 @@ func (s *MessagesService) ListMessages(queryParams *ListMessagesQueryParams) (*M
response, err := RestyClient.R().
SetQueryString(queryParamsString.Encode()).
SetResult(&Messages{}).
SetError(&Error{}).
Get(path)

if err != nil {
3 changes: 3 additions & 0 deletions sdk/organizations_api.go
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ func organizationsPagination(linkHeader string, size, max int) *Organizations {

response, err := RestyClient.R().
SetResult(&Organizations{}).
SetError(&Error{}).
Get(l.URI)

if err != nil {
@@ -80,6 +81,7 @@ func (s *OrganizationsService) GetOrganization(orgID string) (*Organization, *re

response, err := RestyClient.R().
SetResult(&Organization{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -112,6 +114,7 @@ func (s *OrganizationsService) ListOrganizations(queryParams *ListOrganizationsQ
response, err := RestyClient.R().
SetQueryString(queryParamsString.Encode()).
SetResult(&Organizations{}).
SetError(&Error{}).
Get(path)

if err != nil {
7 changes: 7 additions & 0 deletions sdk/people_api.go
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ func peoplePagination(linkHeader string, size, max int) *People {
if l.Rel == "next" {
response, err := RestyClient.R().
SetResult(&People{}).
SetError(&Error{}).
Get(l.URI)

if err != nil {
@@ -121,6 +122,7 @@ func (s *PeopleService) CreatePerson(personRequest *PersonRequest) (*Person, *re
response, err := RestyClient.R().
SetBody(personRequest).
SetResult(&Person{}).
SetError(&Error{}).
Post(path)

if err != nil {
@@ -145,6 +147,7 @@ func (s *PeopleService) DeletePerson(personID string) (*resty.Response, error) {
path = strings.Replace(path, "{"+"personId"+"}", fmt.Sprintf("%v", personID), -1)

response, err := RestyClient.R().
SetError(&Error{}).
Delete(path)

if err != nil {
@@ -165,6 +168,7 @@ func (s *PeopleService) GetMe() (*Person, *resty.Response, error) {

response, err := RestyClient.R().
SetResult(&Person{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -190,6 +194,7 @@ func (s *PeopleService) GetPerson(personID string) (*Person, *resty.Response, er

response, err := RestyClient.R().
SetResult(&Person{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -232,6 +237,7 @@ func (s *PeopleService) ListPeople(queryParams *ListPeopleQueryParams) (*People,
response, err := RestyClient.R().
SetQueryString(queryParamsString.Encode()).
SetResult(&People{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -273,6 +279,7 @@ func (s *PeopleService) Update(personID string, personRequest *PersonRequest) (*
response, err := RestyClient.R().
SetBody(personRequest).
SetResult(&Person{}).
SetError(&Error{}).
Put(path)

if err != nil {
4 changes: 4 additions & 0 deletions sdk/places_api.go
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@ func placesPagination(linkHeader string, size, max int) *Places {

response, err := RestyClient.R().
SetResult(&Places{}).
SetError(&Error{}).
Get(l.URI)

if err != nil {
@@ -96,6 +97,7 @@ func (s *PlacesService) CreatePlace(placeCreateRequest *PlaceCreateRequest) (*Pl
response, err := RestyClient.R().
SetBody(placeCreateRequest).
SetResult(&Place{}).
SetError(&Error{}).
Post(path)

if err != nil {
@@ -146,6 +148,7 @@ func (s *PlacesService) GetPlace(placeID string) (*Place, *resty.Response, error

response, err := RestyClient.R().
SetResult(&Place{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -229,6 +232,7 @@ func (s *PlacesService) UpdatePlace(placeID string, placeUpdateRequest *PlaceUpd
response, err := RestyClient.R().
SetBody(placeUpdateRequest).
SetResult(&Place{}).
SetError(&Error{}).
Put(path)

if err != nil {
3 changes: 3 additions & 0 deletions sdk/recordings.go
Original file line number Diff line number Diff line change
@@ -68,6 +68,7 @@ func recordingsPagination(linkHeader string, size, max int) *Recordings {
if l.Rel == "next" {
response, err := RestyClient.R().
SetResult(&Recordings{}).
SetError(&Error{}).
Get(l.URI)

if err != nil {
@@ -123,6 +124,7 @@ func (s *RecordingsService) ListRecordings(queryParams *ListRecordingsQueryParam
response, err := RestyClient.R().
SetQueryString(queryParamsString.Encode()).
SetResult(&Recordings{}).
SetError(&Error{}).
Get(path)

if err != nil {
@@ -159,6 +161,7 @@ func (s *RecordingsService) GetRecording(recordingID string) (*RecordingDetails,

response, err := RestyClient.R().
SetResult(&RecordingDetails{}).
SetError(&Error{}).
Get(path)

if err != nil {
Loading

0 comments on commit 7e9fb55

Please sign in to comment.