Skip to content

Commit e22704a

Browse files
authored
chore: regen sdk (#3)
1 parent e87a6c0 commit e22704a

File tree

222 files changed

+21945
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+21945
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"magicbell-go-project-client": minor
3+
---
4+
5+
Automatic minor version bump for changes in `magicbell-go-project-client`.

README.md

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
# MagicbellProjectClient Go SDK 0.0.0
2+
3+
Welcome to the MagicbellProjectClient SDK documentation. This guide will help you get started with integrating and using the MagicbellProjectClient SDK in your project.
4+
5+
[![This SDK was generated by liblab](https://public-liblab-readme-assets.s3.us-east-1.amazonaws.com/built-by-liblab-icon.svg)](https://liblab.com/?utm_source=readme)
6+
7+
## Versions
8+
9+
- API version: `2.0.0`
10+
- SDK version: `0.0.0`
11+
12+
## About the API
13+
14+
OpenAPI 3.0.3 Specification for MagicBell API.
15+
16+
## Table of Contents
17+
18+
- [Setup & Configuration](#setup--configuration)
19+
- [Supported Language Versions](#supported-language-versions)
20+
- [Installation](#installation)
21+
- [Authentication](#authentication)
22+
- [Access Token Authentication](#access-token-authentication)
23+
- [Services](#services)
24+
- [Response Wrappers](#response-wrappers)
25+
- [Models](#models)
26+
- [License](#license)
27+
28+
# Setup & Configuration
29+
30+
## Supported Language Versions
31+
32+
This SDK is compatible with the following versions: `Go >= 1.19.0`
33+
34+
## Authentication
35+
36+
### Access Token Authentication
37+
38+
The magicbell-project-client API uses an Access Token for authentication.
39+
40+
This token must be provided to authenticate your requests to the API.
41+
42+
#### Setting the Access Token
43+
44+
When you initialize the SDK, you can set the access token as follows:
45+
46+
```go
47+
import (
48+
"github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclient"
49+
"github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclientconfig"
50+
)
51+
52+
config := magicbellprojectclientconfig.NewConfig()
53+
config.SetAccessToken("YOUR-TOKEN")
54+
55+
sdk := magicbellprojectclient.NewMagicbellProjectClient(config)
56+
```
57+
58+
If you need to set or update the access token after initializing the SDK, you can use:
59+
60+
```go
61+
import (
62+
"github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclient"
63+
"github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclientconfig"
64+
)
65+
66+
config := magicbellprojectclientconfig.NewConfig()
67+
68+
sdk := magicbellprojectclient.NewMagicbellProjectClient(config)
69+
sdk.SetAccessToken("YOUR-TOKEN")
70+
```
71+
72+
## Services
73+
74+
The SDK provides various services to interact with the API.
75+
76+
<details>
77+
<summary>Below is a list of all available services with links to their detailed documentation:</summary>
78+
79+
| Name |
80+
| :-------------------------------------------------------------------- |
81+
| [BroadcastsService](documentation/services/broadcasts_service.md) |
82+
| [ChannelsService](documentation/services/channels_service.md) |
83+
| [EventsService](documentation/services/events_service.md) |
84+
| [IntegrationsService](documentation/services/integrations_service.md) |
85+
| [JwtService](documentation/services/jwt_service.md) |
86+
87+
</details>
88+
89+
### Response Wrappers
90+
91+
All services use response wrappers to provide a consistent interface to return the responses from the API.
92+
93+
The response wrapper itself is a generic struct that contains the response data and metadata.
94+
95+
<details>
96+
<summary>Below are the response wrappers used in the SDK:</summary>
97+
98+
#### `MagicbellProjectClientResponse[T]`
99+
100+
This response wrapper is used to return the response data from the API. It contains the following fields:
101+
102+
| Name | Type | Description |
103+
| :------- | :--------------------------------------- | :------------------------------------------ |
104+
| Data | `T` | The body of the API response |
105+
| Metadata | `MagicbellProjectClientResponseMetadata` | Status code and headers returned by the API |
106+
107+
#### `MagicbellProjectClientError`
108+
109+
This response wrapper is used to return an error. It contains the following fields:
110+
111+
| Name | Type | Description |
112+
| :------- | :--------------------------------------- | :------------------------------------------ |
113+
| Err | `error` | The error that occurred |
114+
| Body | `T` | The body of the API response |
115+
| Metadata | `MagicbellProjectClientResponseMetadata` | Status code and headers returned by the API |
116+
117+
#### `MagicbellProjectClientResponseMetadata`
118+
119+
This struct is shared by both response wrappers and contains the following fields:
120+
121+
| Name | Type | Description |
122+
| :--------- | :------------------ | :----------------------------------------------- |
123+
| Headers | `map[string]string` | A map containing the headers returned by the API |
124+
| StatusCode | `int` | The status code returned by the API |
125+
126+
</details>
127+
128+
## Models
129+
130+
The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
131+
132+
<details>
133+
<summary>Below is a list of all available models with links to their detailed documentation:</summary>
134+
135+
| Name | Description |
136+
| :------------------------------------------------------------------------------------------------ | :---------- |
137+
| [ArrayOfBroadcasts](documentation/models/array_of_broadcasts.md) | |
138+
| [Broadcast](documentation/models/broadcast.md) | |
139+
| [ProjectDeliveryConfig](documentation/models/project_delivery_config.md) | |
140+
| [CategoryDeliveryConfig](documentation/models/category_delivery_config.md) | |
141+
| [ArrayOfMetadataApnsTokens](documentation/models/array_of_metadata_apns_tokens.md) | |
142+
| [MetadataApnsToken](documentation/models/metadata_apns_token.md) | |
143+
| [DiscardResult](documentation/models/discard_result.md) | |
144+
| [ArrayOfMetadataExpoTokens](documentation/models/array_of_metadata_expo_tokens.md) | |
145+
| [MetadataExpoToken](documentation/models/metadata_expo_token.md) | |
146+
| [ArrayOfMetadataFcmTokens](documentation/models/array_of_metadata_fcm_tokens.md) | |
147+
| [MetadataFcmToken](documentation/models/metadata_fcm_token.md) | |
148+
| [ArrayOfMetadataSlackTokens](documentation/models/array_of_metadata_slack_tokens.md) | |
149+
| [MetadataSlackToken](documentation/models/metadata_slack_token.md) | |
150+
| [ArrayOfMetadataTeamsTokens](documentation/models/array_of_metadata_teams_tokens.md) | |
151+
| [MetadataTeamsToken](documentation/models/metadata_teams_token.md) | |
152+
| [ArrayOfMetadataWebPushTokens](documentation/models/array_of_metadata_web_push_tokens.md) | |
153+
| [MetadataWebPushToken](documentation/models/metadata_web_push_token.md) | |
154+
| [ArrayOfEvents](documentation/models/array_of_events.md) | |
155+
| [ArrayOfIntegrationObjects](documentation/models/array_of_integration_objects.md) | |
156+
| [ArrayOfApnsConfigObjects](documentation/models/array_of_apns_config_objects.md) | |
157+
| [ApnsConfig](documentation/models/apns_config.md) | |
158+
| [ArrayOfAwssnsConfigObjects](documentation/models/array_of_awssns_config_objects.md) | |
159+
| [AwssnsConfig](documentation/models/awssns_config.md) | |
160+
| [ArrayOfExpoConfigObjects](documentation/models/array_of_expo_config_objects.md) | |
161+
| [ExpoConfig](documentation/models/expo_config.md) | |
162+
| [ArrayOfFcmConfigObjects](documentation/models/array_of_fcm_config_objects.md) | |
163+
| [FcmConfig](documentation/models/fcm_config.md) | |
164+
| [ArrayOfGithubConfigObjects](documentation/models/array_of_github_config_objects.md) | |
165+
| [GithubConfig](documentation/models/github_config.md) | |
166+
| [ArrayOfInboxConfigObjects](documentation/models/array_of_inbox_config_objects.md) | |
167+
| [InboxConfig](documentation/models/inbox_config.md) | |
168+
| [ArrayOfMailgunConfigObjects](documentation/models/array_of_mailgun_config_objects.md) | |
169+
| [MailgunConfig](documentation/models/mailgun_config.md) | |
170+
| [ArrayOfPingConfigObjects](documentation/models/array_of_ping_config_objects.md) | |
171+
| [PingConfig](documentation/models/ping_config.md) | |
172+
| [ArrayOfSendgridConfigObjects](documentation/models/array_of_sendgrid_config_objects.md) | |
173+
| [SendgridConfig](documentation/models/sendgrid_config.md) | |
174+
| [ArrayOfSesConfigObjects](documentation/models/array_of_ses_config_objects.md) | |
175+
| [SesConfig](documentation/models/ses_config.md) | |
176+
| [ArrayOfSlackConfigObjects](documentation/models/array_of_slack_config_objects.md) | |
177+
| [SlackConfig](documentation/models/slack_config.md) | |
178+
| [ArrayOfStripeConfigObjects](documentation/models/array_of_stripe_config_objects.md) | |
179+
| [StripeConfig](documentation/models/stripe_config.md) | |
180+
| [ArrayOfTemplatesConfigObjects](documentation/models/array_of_templates_config_objects.md) | |
181+
| [ArrayOfTwilioConfigObjects](documentation/models/array_of_twilio_config_objects.md) | |
182+
| [TwilioConfig](documentation/models/twilio_config.md) | |
183+
| [ArrayOfWebpushConfigObjects](documentation/models/array_of_webpush_config_objects.md) | |
184+
| [WebpushConfig](documentation/models/webpush_config.md) | |
185+
| [ArrayOfFetchTokensResponseTokens](documentation/models/array_of_fetch_tokens_response_tokens.md) | |
186+
| [CreateProjectTokenRequest](documentation/models/create_project_token_request.md) | |
187+
| [AccessToken](documentation/models/access_token.md) | |
188+
| [DiscardTokenResponse](documentation/models/discard_token_response.md) | |
189+
| [CreateUserTokenRequest](documentation/models/create_user_token_request.md) | |
190+
| [Links](documentation/models/links.md) | |
191+
| [ApnsToken](documentation/models/apns_token.md) | |
192+
| [TokenMetadata](documentation/models/token_metadata.md) | |
193+
| [ExpoToken](documentation/models/expo_token.md) | |
194+
| [FcmToken](documentation/models/fcm_token.md) | |
195+
| [SlackToken](documentation/models/slack_token.md) | |
196+
| [TeamsToken](documentation/models/teams_token.md) | |
197+
| [WebPushToken](documentation/models/web_push_token.md) | |
198+
| [Event](documentation/models/event.md) | |
199+
| [IntegrationObject](documentation/models/integration_object.md) | |
200+
| [ApnsConfigObject](documentation/models/apns_config_object.md) | |
201+
| [AwssnsConfigObject](documentation/models/awssns_config_object.md) | |
202+
| [ExpoConfigObject](documentation/models/expo_config_object.md) | |
203+
| [FcmConfigObject](documentation/models/fcm_config_object.md) | |
204+
| [GithubConfigObject](documentation/models/github_config_object.md) | |
205+
| [InboxConfigObject](documentation/models/inbox_config_object.md) | |
206+
| [MailgunConfigObject](documentation/models/mailgun_config_object.md) | |
207+
| [PingConfigObject](documentation/models/ping_config_object.md) | |
208+
| [SendgridConfigObject](documentation/models/sendgrid_config_object.md) | |
209+
| [SesConfigObject](documentation/models/ses_config_object.md) | |
210+
| [SlackConfigObject](documentation/models/slack_config_object.md) | |
211+
| [StripeConfigObject](documentation/models/stripe_config_object.md) | |
212+
| [TemplatesConfigObject](documentation/models/templates_config_object.md) | |
213+
| [TwilioConfigObject](documentation/models/twilio_config_object.md) | |
214+
| [WebpushConfigObject](documentation/models/webpush_config_object.md) | |
215+
| [FetchTokensResponseToken](documentation/models/fetch_tokens_response_token.md) | |
216+
217+
</details>
218+
219+
## License
220+
221+
This SDK is licensed under the MIT License.
222+
223+
See the [LICENSE](LICENSE) file for more details.

cmd/examples/example.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package main
2+
3+
import (
4+
"context"
5+
"fmt"
6+
7+
"github.com/magicbell/magicbell-go-project-client/pkg/broadcasts"
8+
"github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclient"
9+
"github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclientconfig"
10+
)
11+
12+
func main() {
13+
config := magicbellprojectclientconfig.NewConfig()
14+
client := magicbellprojectclient.NewMagicbellProjectClient(config)
15+
16+
params := broadcasts.ListBroadcastsRequestParams{}
17+
18+
response, err := client.Broadcasts.ListBroadcasts(context.Background(), params)
19+
if err != nil {
20+
panic(err)
21+
}
22+
fmt.Printf("%+v", response)
23+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# AccessToken
2+
3+
**Properties**
4+
5+
| Name | Type | Required | Description |
6+
| :-------- | :----- | :------- | :---------- |
7+
| CreatedAt | string || |
8+
| Token | string || |
9+
| TokenId | string || |
10+
| ExpiresAt | string || |
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ApnsConfig
2+
3+
**Properties**
4+
5+
| Name | Type | Required | Description |
6+
| :------------- | :-------------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7+
| AppId | string || The default bundle identifier of the application that is configured with this project. It can be overriden on a per token basis, when registering device tokens. |
8+
| Badge | integrations.Badge || |
9+
| Certificate | string || The APNs certificate in P8 format. Generate it at [developer.apple.com](https://developer.apple.com/account/resources/authkeys/add) with the 'Apple Push Notification service (APNs)' option selected. |
10+
| KeyId | string || |
11+
| TeamId | string || |
12+
| PayloadVersion | integrations.PayloadVersion || |
13+
14+
# Badge
15+
16+
**Properties**
17+
18+
| Name | Type | Required | Description |
19+
| :----- | :----- | :------- | :---------- |
20+
| unread | string || "unread" |
21+
| unseen | string || "unseen" |
22+
23+
# PayloadVersion
24+
25+
**Properties**
26+
27+
| Name | Type | Required | Description |
28+
| :--- | :----- | :------- | :---------- |
29+
| \_1 | string || "1" |
30+
| \_2 | string || "2" |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ApnsConfigObject
2+
3+
**Properties**
4+
5+
| Name | Type | Required | Description |
6+
| :----- | :---------------------- | :------- | :---------- |
7+
| Config | integrations.ApnsConfig || |
8+
| Id | string || |
9+
| Name | string || |

0 commit comments

Comments
 (0)