No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 2.0
- Package version: 0.1.8
- Generator version: 7.12.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/contextPut the package under your project folder and add the following in import:
import bsgapi "github.com/bsgworld/go-sdk"To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value bsgapi.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), bsgapi.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value bsgapi.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), bsgapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using bsgapi.ContextOperationServerIndices and bsgapi.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), bsgapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), bsgapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})All URIs are relative to https://one-api.bsg.world
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AccountBalanceAPI | AccountBalance | Get /api/accounts/balance | Get balance |
| AccountTariffsAPI | AccountTariffs | Get /api/accounts/tariff | Get tariffs |
| CampaignAPI | CampaignSend | Post /api/campaigns/send | Send campaign |
| CampaignDetailsAPI | CampaignDetails | Get /api/campaigns/{id}/detail | Get campaign details |
| CampaignPriceAPI | CampaignPrice | Post /api/campaigns/price | Calculate campaign price |
| CampaignRCSAPI | RcsSendGroups | Post /api/campaigns/rcs/send-groups | Send RCS message to contact list |
| CampaignStopAPI | CampaignStop | Patch /api/campaigns/{id}/stop | Cancel campaign |
| CampaignTagAPI | Campaign | Get /api/campaigns/{id} | Get campaign info |
| CampaignViberAPI | ViberSend | Post /api/campaigns/viber/send | Send Viber campaign |
| CampaignsAPI | Campaigns | Get /api/campaigns | List of campaigns |
| CancelOtpAPI | CancelOtp | Post /api/2fa/authentications/{id}/cancel | Cancel the authentication session |
| ContactCreateAPI | ContactCreate | Post /api/contacts | Create a contact |
| ContactDeleteAPI | ContactDelete | Delete /api/contacts/{id} | Delete contact |
| ContactFieldCreateAPI | ContactFieldCreate | Post /api/contacts/fields | Create contact field |
| ContactFieldUpdateAPI | ContactFieldUpdate | Patch /api/contacts/fields/{id} | Update contact field |
| ContactFieldsAPI | ContactFields | Get /api/contacts/fields | List of contact fields |
| ContactListAttachAPI | ContactListAttach | Post /api/groups/attach | Add contacts to the list |
| ContactListCreateAPI | ContactListCreate | Post /api/groups | Create list |
| ContactListDeleteAPI | ContactListDelete | Delete /api/groups/{id} | Delete list |
| ContactListDetachAPI | ContactListDetach | Post /api/groups/detach | Remove contacts from the list |
| ContactListSearchAPI | ContactListSearch | Get /api/groups/search | Search list |
| ContactListTagAPI | ContactList | Get /api/groups/{id} | Get list by id |
| ContactListUpdateAPI | ContactListUpdate | Put /api/groups/{id} | Update list |
| ContactListsAPI | ContactLists | Get /api/groups | List of contact lists |
| ContactTagAPI | Contact | Get /api/contacts/{id} | Get contact by ID |
| ContactUpdateAPI | ContactUpdate | Put /api/contacts/{id} | Update contact |
| ContactsAPI | Contacts | Get /api/contacts | List of contacts |
| ContactsDeleteAPI | ContactsDelete | Post /api/contacts/delete | Delete multiple contacts |
| ContactsSearchAPI | ContactsSearch | Get /api/contacts/search | Search contacts |
| EmailSendAPI | EmailSend | Post /api/email/send-emails | Send Email |
| EmailTemplateSendAPI | EmailTemplateSend | Post /api/email/send-template-emails | Send Email template |
| GetMessagesAPI | GetMessages | Get /api/messages | Find messages |
| GetSettingsAddressBookFieldsByIdAPI | GetSettingsAddressBookFieldsById | Get /api/settings/address-book-fields/{id} | Get settings value |
| LoginAPI | Login | Post /api/auth/login | Receive JWT token |
| MessagesAPI | SendMessage | Post /api/messages/send | Send single message |
| MessagesWhatsAppAPI | WhatsappSingle | Post /api/messages/whatsapp/send | Send single WhatsApp message |
| OtpListAPI | OtpList | Get /api/2fa/authentications | List of authentication sessions |
| OtpTemplateAPI | OtpTemplate | Get /api/2fa/authentications/templates/{templateId} | Get message template |
| OtpTemplateCreateAPI | OtpTemplateCreate | Post /api/2fa/authentications/templates | Create a message template |
| OtpTemplateDeleteAPI | OtpTemplateDelete | Delete /api/2fa/authentications/templates/{templateId} | Delete a message template |
| OtpTemplateListAPI | OtpTemplateList | Get /api/2fa/authentications/templates | List of message templates |
| PostCampaignsWhatsappSendAPI | PostCampaignsWhatsappSend | Post /api/campaigns/whatsapp/send | Send WhatsApp campaign |
| PostContactsFieldsDeleteAPI | PostContactsFieldsDelete | Post /api/contacts/fields/delete | Delete contact fields by ids |
| RcsSendGroupsAPI | RcsSend | Post /api/campaigns/rcs/send | Send RCS message |
| RcsSingleAPI | RcsSingle | Post /api/messages/rcs/send | Send single RCS message |
| RefreshTokenAPI | RefreshToken | Post /api/auth/refresh | Refresh JWT token |
| ResendOtpAPI | ResendOtp | Post /api/2fa/authentications/otp/{id}/resend | Resend the one-time code |
| SendOtpAPI | SendOtp | Post /api/2fa/authentications/otp | Send One-time password |
| SenderRequestLegalAPI | SenderRequestLegal | Post /api/senders/requests/legal | Sender registration by a legal entity |
| SenderRequestNaturalAPI | SenderRequestNatural | Post /api/senders/requests/natural | Sender registration by an individual |
| SenderRequestsAPI | SenderRequests | Get /api/senders/requests/sms | List of Sender Requests |
| SendersTagAPI | Senders | Get /api/senders | List of Senders |
| ShortUrlsClicksAPI | ShortUrlsClicks | Get /api/short-url/clicks | List of clicks |
| ShortUrlsDomainAPI | ShortUrlsDomain | Get /api/short-url/domains/{uuid} | Get domain by uuid |
| ShortUrlsDomainCreateAPI | ShortUrlsDomainCreate | Post /api/short-url/domains | Add domain |
| ShortUrlsDomainRemoveAPI | ShortUrlsDomainRemove | Delete /api/short-url/domains/{uuid} | Remove domain |
| ShortUrlsDomainUpdateAPI | ShortUrlsDomainUpdate | Put /api/short-url/domains/{uuid} | Update domain |
| ShortUrlsDomainsAPI | ShortUrlsDomains | Get /api/short-url/domains | List of domains |
| ShortUrlsLinkAPI | ShortUrlsLink | Get /api/short-url/links/{uuid}/statistics | Get short link statistic |
| ShortUrlsLinkCreateAPI | ShortUrlsLinkCreate | Post /api/short-url/links | Create short link |
| ShortUrlsLinkDeleteAPI | ShortUrlsLinkDelete | Delete /api/short-url/links/{uuid} | Remove short link |
| ShortUrlsLinkUpdateAPI | ShortUrlsLinkUpdate | Put /api/short-url/links/{uuid} | Update short link |
| ShortUrlsLinksAPI | ShortUrlsLinks | Get /api/short-url/links | List of short links |
| SmsSendAPI | SmsSend | Post /api/campaigns/sms/send | Send SMS campaign |
| SmsSendGroupsAPI | SmsSendGroups | Post /api/campaigns/sms/send-groups | Send SMS to contact list |
| SmsSendIndividualAPI | SmsSendIndividual | Post /api/campaigns/sms/send-individual | Send SMS with different text |
| StatisticAPI | StatJobsCreate | Post /api/stat/jobs | Create new job |
| StatisticAPI | StatJobsDelete | Delete /api/stat/jobs/{id} | Delete job result |
| StatisticAPI | StatJobsList | Get /api/stat/jobs | List statistic jobs |
| StatisticAPI | StatJobsShow | Get /api/stat/jobs/{id} | Load job result |
| StatusOtpAPI | StatusOtp | Get /api/2fa/authentications/{id} | Check authentication status |
| StoplistAddAPI | StoplistAdd | Post /api/stoplist/attach | Add contacts to stop list |
| StoplistItemsAPI | StoplistItems | Get /api/stoplist | List the contacts of stop lists |
| StoplistRemoveAPI | StoplistRemove | Post /api/stoplist/detach | Remove contacts from stop list |
| StoplistSearchAPI | StoplistSearch | Get /api/stoplist/search | Search contacts in Stop lists |
| VerifyOtpAPI | VerifyOtp | Post /api/2fa/authentications/otp/{id}/verify | Check one-time Code |
- AccountBalance200Response
- AccountTariffs200Response
- AlternativeChannel
- BalanceSchema
- Campaign
- CampaignDetails200Response
- CampaignPrice200Response
- CampaignPrice422Response
- CampaignPriceRequest
- CampaignPriceRequestMessagesItem
- CampaignResponse
- CampaignSchema
- CampaignStatus
- CampaignStop200Response
- CampaignStop422Response
- CancelOtp200Response
- CancelOtp404Response
- CancelOtp422Response
- Card
- Cards
- ClickResource
- Components
- Contact200Response
- Contact422Response
- ContactCreate201Response
- ContactCreate422Response
- ContactFieldCollectionSchema
- ContactFieldCreate201Response
- ContactFieldCreateRequest
- ContactFieldSchema
- ContactFieldType
- ContactFieldUpdate200Response
- ContactFieldUpdateRequest
- ContactFieldUpdateRequestOptionDescription
- ContactFieldUpdateRequestOptionIsVisible
- ContactFieldUpdateRequestOptionName
- ContactFieldValuePair
- ContactGroupSchema
- ContactGroupSearchField
- ContactGroupSearchSchema
- ContactList200Response
- ContactListAttachRequest
- ContactListCreate201Response
- ContactListCreate422Response
- ContactListCreateRequest
- ContactListDetachRequest
- ContactListSearch200Response
- ContactListSearchCriteria
- ContactListSearchMeta
- ContactListUpdate200Response
- ContactListUpdate422Response
- ContactListUpdateRequest
- ContactLists200Response
- ContactSchema
- ContactUpdate200Response
- ContactUpdate422Response
- ContactUpdateRequest
- Contacts200Response
- ContactsSearch200Response
- ContactsSearchCriteria
- ContactsSearchMeta
- CorePriceSchema
- CountryItem
- CreateJobMessage
- CreateJobParams
- CurrencyItem
- DetailCampaignSchema
- DetailCampaignSchemaAlternativeChannels
- DetailCampaignSchemaAlternativeChannelsSms
- DetailCampaignSchemaAlternativeChannelsStatistics
- DomainStoreRequest
- DomainUpdateRequest
- EmailResponse
- GetInternal2faAuthenticationsFullPrice200Response
- GetInternalCorePrices200Response
- GetInternalCorePricesByCountryCode200Response
- GetInternalCountries200Response
- GetInternalCurrencies200Response
- GetInternalWstPrices200Response
- GetInternalWstPricesByCountryCode200Response
- GetMessages200Response
- GroupsTrait
- IndividualMessageData
- Inline
- Language
- LinkStoreRequest
- LinkUpdateRequest
- LoginRequest
- Media
- MessageApiSchema
- MessageApiSchemaAlternativeChannels
- MessageApiSchemaAlternativeChannelsSms
- MessageApiSchemaAlternativeChannelsSmsDetails
- MessageApiSchemaAlternativeChannelsViber
- MessageApiSchemaAlternativeChannelsViberDetails
- MessageInfo
- MessagePriceObject
- MessageResponse
- MessageSource
- MessageStatus
- MessageType
- MessageUniversal
- Meta
- MetaPage
- OperatorSchema
- Options
- OtpChannel
- OtpList200Response
- OtpListResponseData
- OtpMessageStatus
- OtpStatus
- OtpTemplate200Response
- OtpTemplate404Response
- OtpTemplateCreate200Response
- OtpTemplateCreate422Response
- OtpTemplateCreateRequest
- OtpTemplateDelete200Response
- OtpTemplateDelete404Response
- OtpTemplateDelete422Response
- OtpTemplateDeleteResponseData
- OtpTemplateList200Response
- OtpTemplateListResponseData
- OtpTemplateStatus
- Parameter
- Phone
- PhonesTrait
- PostContactsFieldsDeleteRequest
- Rcs
- RcsClickCallback
- RcsMessage
- RcsSend200Response
- RcsSendGroups200Response
- RcsStatusCallback
- Recipients
- ResendOtp200Response
- ResendOtp404Response
- ResendOtp422Response
- SearchCampaignResource
- SearchOperator
- SendEmail
- SendOtp201Response
- SendOtp422Response
- SendOtpRequest
- SendRcsCampaign
- SendRcsCampaignGroups
- SendRcsCampaignGroupsAlternativeChannel
- SendTemplateEmail
- SendViberCampaign
- SendWhatsAppCampaign
- SendWhatsAppCampaignAlternativeChannel
- SenderRequestLegal201Response
- SenderRequestLegalRequest
- SenderRequestLegalSchema
- SenderRequestNatural201Response
- SenderRequestNaturalRequest
- SenderRequestNaturalSchema
- SenderRequestSchema
- SenderRequestStatus
- SenderRequestType
- SenderRequests200Response
- SenderSchema
- Senders200Response
- ShortDomainNotFound
- ShortDomainSlugType
- ShortLink
- ShortLinkStatus
- ShortUrlDomainListSchema
- ShortUrlDomainSchema
- ShortUrlLinkSchema
- ShortUrlsClicks200Response
- ShortUrlsDomain200Response
- ShortUrlsDomainCreate201Response
- ShortUrlsDomainCreate422Response
- ShortUrlsDomainUpdate200Response
- ShortUrlsDomains200Response
- ShortUrlsLink200Response
- ShortUrlsLink404Response
- ShortUrlsLinkCreate201Response
- ShortUrlsLinkDelete422Response
- ShortUrlsLinkStatisticData
- ShortUrlsLinkUpdate200Response
- ShortUrlsLinkUpdate422Response
- ShortUrlsLinks200Response
- Sms
- SmsAltChannel
- SmsCampaignResponse
- SmsSendGroupsRequest
- SmsSendIndividualRequest
- SmsSendRequest
- SmsSendRequestPhonesItem
- SortWay
- StatJobsCreate200Response
- StatJobsCreateRequest
- StatJobsDelete200Response
- StatisticsData
- StatisticsShort
- StatusOtp200Response
- StatusOtp404Response
- StopListCollection
- StopListPaginateSchema
- StoplistAdd200Response
- StoplistAddRequest
- StoplistItems200Response
- StoplistRemoveRequest
- StoplistSearch200Response
- StoplistSearchCriteria
- StoplistSearchField
- StoplistSearchMeta
- StoreContact
- Suggestion
- SuggestionCall
- SuggestionLink
- TariffSchema
- Telegram
- Template
- Text
- TokenSchema
- TooManyRequestsResponse
- TwoFaTemplateResource
- TwoFactorAuthenticationMessagesResource
- TwoFactorAuthenticationSchema
- TwoFactorMessageResource
- VerifyOtp200Response
- VerifyOtp404Response
- VerifyOtp422Response
- VerifyOtpRequest
- Viber
- ViberCampaignResponse
- Voice
- WhatsAppMessage
- WhatsAppMessageAlternativeChannel
- WhatsAppMessageTemplate
- WstPriceSchema
Authentication schemes defined for the API:
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), bsgapi.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), bsgapi.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime