Skip to content

puupee/puupee-api-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for puupee

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

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: 1.0.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import puupee "github.com/puupee/puupee-api-go"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), puupee.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), puupee.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

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 sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), puupee.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), puupee.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AbpApiDefinitionApi ApiAbpApiDefinitionGet Get /api/abp/api-definition
AbpApplicationConfigurationApi ApiAbpApplicationConfigurationGet Get /api/abp/application-configuration
AbpApplicationLocalizationApi ApiAbpApplicationLocalizationGet Get /api/abp/application-localization
AbpTenantApi ApiAbpMultiTenancyTenantsByIdIdGet Get /api/abp/multi-tenancy/tenants/by-id/{id}
AbpTenantApi ApiAbpMultiTenancyTenantsByNameNameGet Get /api/abp/multi-tenancy/tenants/by-name/{name}
AccountApi ApiAccountRegisterPost Post /api/account/register
AccountApi ApiAccountResetPasswordPost Post /api/account/reset-password
AccountApi ApiAccountSendPasswordResetCodePost Post /api/account/send-password-reset-code
AccountApi ApiAccountVerifyPasswordResetTokenPost Post /api/account/verify-password-reset-token
AccountApi ApiAppAccountDelete Delete /api/app/account
ApiKeysApi ApiApiKeysGet Get /api/api-keys
ApiKeysApi ApiApiKeysIdDelete Delete /api/api-keys/{id}
ApiKeysApi ApiApiKeysIdGet Get /api/api-keys/{id}
ApiKeysApi ApiApiKeysIdPut Put /api/api-keys/{id}
ApiKeysApi ApiApiKeysPost Post /api/api-keys
AppApi ApiAppAppByDeveloperAllGet Get /api/app/app/by-developer-all
AppApi ApiAppAppByNameGet Get /api/app/app/by-name
AppApi ApiAppAppGet Get /api/app/app
AppApi ApiAppAppIdDelete Delete /api/app/app/{id}
AppApi ApiAppAppIdGet Get /api/app/app/{id}
AppApi ApiAppAppIdPut Put /api/app/app/{id}
AppApi ApiAppAppIdRunStatePut Put /api/app/app/{id}/run-state
AppApi ApiAppAppIdWithUserGet Get /api/app/app/{id}/with-user
AppApi ApiAppAppPost Post /api/app/app
AppApi ApiAppAppPublicGet Get /api/app/app/public
AppApi ApiAppAppRunPost Post /api/app/app/run
AppApi ApiAppAppUploadCredentialsGet Get /api/app/app/upload-credentials
AppApi ApiAppAppWithUserGet Get /api/app/app/with-user
AppFeatureApi ApiAppAppFeatureGet Get /api/app/app-feature
AppFeatureApi ApiAppAppFeatureIdDelete Delete /api/app/app-feature/{id}
AppFeatureApi ApiAppAppFeatureIdPut Put /api/app/app-feature/{id}
AppFeatureApi ApiAppAppFeaturePost Post /api/app/app-feature
AppPricingApi ApiAppAppPricingByAppIdAppIdGet Get /api/app/app-pricing/by-app-id/{appId}
AppPricingApi ApiAppAppPricingGet Get /api/app/app-pricing
AppPricingApi ApiAppAppPricingIdDelete Delete /api/app/app-pricing/{id}
AppPricingApi ApiAppAppPricingIdGet Get /api/app/app-pricing/{id}
AppPricingApi ApiAppAppPricingIdPut Put /api/app/app-pricing/{id}
AppPricingApi ApiAppAppPricingPost Post /api/app/app-pricing
AppPricingItemApi ApiAppAppPricingItemGet Get /api/app/app-pricing-item
AppPricingItemApi ApiAppAppPricingItemIdDelete Delete /api/app/app-pricing-item/{id}
AppPricingItemApi ApiAppAppPricingItemIdGet Get /api/app/app-pricing-item/{id}
AppPricingItemApi ApiAppAppPricingItemIdPut Put /api/app/app-pricing-item/{id}
AppPricingItemApi ApiAppAppPricingItemPost Post /api/app/app-pricing-item
AppReleaseApi ApiAppAppReleaseGet Get /api/app/app-release
AppReleaseApi ApiAppAppReleaseIdDelete Delete /api/app/app-release/{id}
AppReleaseApi ApiAppAppReleaseIdGet Get /api/app/app-release/{id}
AppReleaseApi ApiAppAppReleaseIdPut Put /api/app/app-release/{id}
AppReleaseApi ApiAppAppReleaseLatestGet Get /api/app/app-release/latest
AppReleaseApi ApiAppAppReleasePost Post /api/app/app-release
AppSdkApi ApiAppAppSdkGet Get /api/app/app-sdk
AppSdkApi ApiAppAppSdkIdDelete Delete /api/app/app-sdk/{id}
AppSdkApi ApiAppAppSdkIdPut Put /api/app/app-sdk/{id}
AppSdkApi ApiAppAppSdkPost Post /api/app/app-sdk
AppUserScoreApi ApiAppAppUserScorePost Post /api/app/app-user-score
AvatarApi ApiAppAvatarCredentialsGet Get /api/app/avatar/credentials
AvatarApi ApiAppAvatarPost Post /api/app/avatar
DeviceApi ApiAppDeviceBindPost Post /api/app/device/bind
DeviceApi ApiAppDeviceDelete Delete /api/app/device
DeviceApi ApiAppDeviceGet Get /api/app/device
DeviceApi ApiAppDeviceRefreshPost Post /api/app/device/refresh
EmailSettingsApi ApiSettingManagementEmailingGet Get /api/setting-management/emailing
EmailSettingsApi ApiSettingManagementEmailingPost Post /api/setting-management/emailing
EmailSettingsApi ApiSettingManagementEmailingSendTestEmailPost Post /api/setting-management/emailing/send-test-email
FeaturesApi ApiFeatureManagementFeaturesDelete Delete /api/feature-management/features
FeaturesApi ApiFeatureManagementFeaturesGet Get /api/feature-management/features
FeaturesApi ApiFeatureManagementFeaturesPut Put /api/feature-management/features
KeyValueApi ApiAppKeyValueBoolGet Get /api/app/key-value/bool
KeyValueApi ApiAppKeyValueDateTimeGet Get /api/app/key-value/date-time
KeyValueApi ApiAppKeyValueDecimalGet Get /api/app/key-value/decimal
KeyValueApi ApiAppKeyValueDoubleGet Get /api/app/key-value/double
KeyValueApi ApiAppKeyValueIntGet Get /api/app/key-value/int
KeyValueApi ApiAppKeyValueSetBoolPost Post /api/app/key-value/set-bool
KeyValueApi ApiAppKeyValueSetDateTimePost Post /api/app/key-value/set-date-time
KeyValueApi ApiAppKeyValueSetDecimalPost Post /api/app/key-value/set-decimal
KeyValueApi ApiAppKeyValueSetDoublePost Post /api/app/key-value/set-double
KeyValueApi ApiAppKeyValueSetIntPost Post /api/app/key-value/set-int
KeyValueApi ApiAppKeyValueSetStringPost Post /api/app/key-value/set-string
KeyValueApi ApiAppKeyValueStringGet Get /api/app/key-value/string
LoginApi ApiAccountCheckPasswordPost Post /api/account/check-password
LoginApi ApiAccountLoginPost Post /api/account/login
LoginApi ApiAccountLogoutGet Get /api/account/logout
MessageApi ApiAppMessagePublishPost Post /api/app/message/publish
MessageApi ApiAppMessageRecallPost Post /api/app/message/recall
MessageApi ApiAppMessageSubscribePost Post /api/app/message/subscribe
MessageApi ApiAppMessageUnsubscribePost Post /api/app/message/unsubscribe
MessageSourceApi ApiAppMessageSourceIdDelete Delete /api/app/message-source/{id}
MessageSourceApi ApiAppMessageSourceIdGet Get /api/app/message-source/{id}
MessageSourceApi ApiAppMessageSourceIdPut Put /api/app/message-source/{id}
MessageSourceApi ApiAppMessageSourcePost Post /api/app/message-source
MessageSourceApi ApiAppMessageSourcePublishedListCategoryIdGet Get /api/app/message-source/published-list/{categoryId}
MessageSourceCategoryApi ApiAppMessageSourceCategoryGet Get /api/app/message-source-category
MessageSourceRouteApi ApiAppMessageSourceRouteIdDelete Delete /api/app/message-source-route/{id}
MessageSourceRouteApi ApiAppMessageSourceRouteIdGet Get /api/app/message-source-route/{id}
MessageSourceRouteApi ApiAppMessageSourceRouteIdPut Put /api/app/message-source-route/{id}
MessageSourceRouteApi ApiAppMessageSourceRoutePost Post /api/app/message-source-route
MessageSourceRouteApi ApiAppMessageSourceRoutePublishedListSourceIdGet Get /api/app/message-source-route/published-list/{sourceId}
MessageSourceRouteSubApi ApiAppMessageSourceRouteSubGet Get /api/app/message-source-route-sub
MessageSourceRouteSubApi ApiAppMessageSourceRouteSubIdDelete Delete /api/app/message-source-route-sub/{id}
MessageSourceRouteSubApi ApiAppMessageSourceRouteSubIdGet Get /api/app/message-source-route-sub/{id}
MessageSourceRouteSubApi ApiAppMessageSourceRouteSubIdPut Put /api/app/message-source-route-sub/{id}
MessageSourceRouteSubApi ApiAppMessageSourceRouteSubPost Post /api/app/message-source-route-sub
MessageTemplateApi ApiAppMessageTemplateGet Get /api/app/message-template
MessageTemplateApi ApiAppMessageTemplateIdDelete Delete /api/app/message-template/{id}
MessageTemplateApi ApiAppMessageTemplateIdGet Get /api/app/message-template/{id}
MessageTemplateApi ApiAppMessageTemplateIdPut Put /api/app/message-template/{id}
MessageTemplateApi ApiAppMessageTemplatePost Post /api/app/message-template
MessageTemplateReleaseApi ApiAppMessageTemplateReleaseGet Get /api/app/message-template-release
MessageTemplateReleaseApi ApiAppMessageTemplateReleaseIdGet Get /api/app/message-template-release/{id}
MessageTemplateReleaseApi ApiAppMessageTemplateReleasePost Post /api/app/message-template-release
NotificationApi ApiAppNotificationBarkApiKeyMessageGet Get /api/app/notification/bark/{apiKey}/{message}
NotificationApi ApiAppNotificationGet Get /api/app/notification
NotificationApi ApiAppNotificationPushPost Post /api/app/notification/push
PermissionsApi ApiPermissionManagementPermissionsGet Get /api/permission-management/permissions
PermissionsApi ApiPermissionManagementPermissionsPut Put /api/permission-management/permissions
ProfileApi ApiAccountMyProfileChangePasswordPost Post /api/account/my-profile/change-password
ProfileApi ApiAccountMyProfileGet Get /api/account/my-profile
ProfileApi ApiAccountMyProfilePut Put /api/account/my-profile
PuupeeApi ApiAppPuupeePullGet Get /api/app/puupee/pull
PuupeeApi ApiAppPuupeePushPost Post /api/app/puupee/push
RoleApi ApiIdentityRolesAllGet Get /api/identity/roles/all
RoleApi ApiIdentityRolesGet Get /api/identity/roles
RoleApi ApiIdentityRolesIdDelete Delete /api/identity/roles/{id}
RoleApi ApiIdentityRolesIdGet Get /api/identity/roles/{id}
RoleApi ApiIdentityRolesIdPut Put /api/identity/roles/{id}
RoleApi ApiIdentityRolesPost Post /api/identity/roles
SettingsApi ApiAppSettingsGet Get /api/app/settings
SettingsApi ApiAppSettingsSetPost Post /api/app/settings/set
SimpleDataApi ApiAppSimpleDataGet Get /api/app/simple-data
SimpleDataApi ApiAppSimpleDataIdDelete Delete /api/app/simple-data/{id}
SimpleDataApi ApiAppSimpleDataIdGet Get /api/app/simple-data/{id}
SimpleDataApi ApiAppSimpleDataSavePost Post /api/app/simple-data/save
StorageObjectApi ApiAppStorageObjectFileGet Get /api/app/storage-object/file
StorageObjectApi ApiAppStorageObjectFileOrCredentialsGet Get /api/app/storage-object/file-or-credentials
StorageObjectApi ApiAppStorageObjectPreSignUrlPost Post /api/app/storage-object/pre-sign-url
StorageObjectApi ApiAppStorageObjectThumbGet Get /api/app/storage-object/thumb
SubscriptionApi ApiAppSubscriptionAppleNotificationsPost Post /api/app/subscription/apple-notifications
SubscriptionApi ApiAppSubscriptionGet Get /api/app/subscription
SubscriptionApi ApiAppSubscriptionOrderPost Post /api/app/subscription/order
SubscriptionApi ApiAppSubscriptionVerifyReceiptPost Post /api/app/subscription/verify-receipt
SyncStateApi ApiAppSyncStateGet Get /api/app/sync-state
SyncStateApi ApiAppSyncStatePuupeeChangedEtoPost Post /api/app/sync-state/puupee-changed-eto
TenantApi ApiMultiTenancyTenantsGet Get /api/multi-tenancy/tenants
TenantApi ApiMultiTenancyTenantsIdDefaultConnectionStringDelete Delete /api/multi-tenancy/tenants/{id}/default-connection-string
TenantApi ApiMultiTenancyTenantsIdDefaultConnectionStringGet Get /api/multi-tenancy/tenants/{id}/default-connection-string
TenantApi ApiMultiTenancyTenantsIdDefaultConnectionStringPut Put /api/multi-tenancy/tenants/{id}/default-connection-string
TenantApi ApiMultiTenancyTenantsIdDelete Delete /api/multi-tenancy/tenants/{id}
TenantApi ApiMultiTenancyTenantsIdGet Get /api/multi-tenancy/tenants/{id}
TenantApi ApiMultiTenancyTenantsIdPut Put /api/multi-tenancy/tenants/{id}
TenantApi ApiMultiTenancyTenantsPost Post /api/multi-tenancy/tenants
TestApi ApiTestDatetimeGet Get /api/Test/datetime
UserApi ApiIdentityUsersAssignableRolesGet Get /api/identity/users/assignable-roles
UserApi ApiIdentityUsersByEmailEmailGet Get /api/identity/users/by-email/{email}
UserApi ApiIdentityUsersByUsernameUserNameGet Get /api/identity/users/by-username/{userName}
UserApi ApiIdentityUsersGet Get /api/identity/users
UserApi ApiIdentityUsersIdDelete Delete /api/identity/users/{id}
UserApi ApiIdentityUsersIdGet Get /api/identity/users/{id}
UserApi ApiIdentityUsersIdPut Put /api/identity/users/{id}
UserApi ApiIdentityUsersIdRolesGet Get /api/identity/users/{id}/roles
UserApi ApiIdentityUsersIdRolesPut Put /api/identity/users/{id}/roles
UserApi ApiIdentityUsersPost Post /api/identity/users
UserLookupApi ApiIdentityUsersLookupByUsernameUserNameGet Get /api/identity/users/lookup/by-username/{userName}
UserLookupApi ApiIdentityUsersLookupCountGet Get /api/identity/users/lookup/count
UserLookupApi ApiIdentityUsersLookupIdGet Get /api/identity/users/lookup/{id}
UserLookupApi ApiIdentityUsersLookupSearchGet Get /api/identity/users/lookup/search
UserStorageApi ApiAppUserStorageGet Get /api/app/user-storage
VerificationApi ApiAppVerificationSendCodePost Post /api/app/verification/send-code

Documentation For Models

Documentation For Authorization

oauth2

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

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:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages