Skip to content

Latest commit

 

History

History
377 lines (244 loc) · 11.3 KB

ProfilesAPI.md

File metadata and controls

377 lines (244 loc) · 11.3 KB

\ProfilesAPI

All URIs are relative to https://api.paxos.com/v2

Method HTTP request Description
CreateProfile Post /profiles Create Profile
GetProfile Get /profiles/{profile_id} Get Profile
GetProfileBalance Get /profiles/{profile_id}/balances/{asset} Get Profile Balance
ListProfileBalances Get /profiles/{profile_id}/balances List Profile Balances
ListProfiles Get /profiles List Profiles

CreateProfile

Profile CreateProfile(ctx).CreateProfileRequest(createProfileRequest).Execute()

Create Profile

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/avianlabs/paxos-go"
)

func main() {
	createProfileRequest := *openapiclient.NewCreateProfileRequest("Nickname_example") // CreateProfileRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ProfilesAPI.CreateProfile(context.Background()).CreateProfileRequest(createProfileRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ProfilesAPI.CreateProfile``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateProfile`: Profile
	fmt.Fprintf(os.Stdout, "Response from `ProfilesAPI.CreateProfile`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateProfileRequest struct via the builder pattern

Name Type Description Notes
createProfileRequest CreateProfileRequest

Return type

Profile

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetProfile

Profile GetProfile(ctx, profileId).Execute()

Get Profile

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/avianlabs/paxos-go"
)

func main() {
	profileId := "profileId_example" // string | The UUID of the profile, or \"default\" for the default profile.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ProfilesAPI.GetProfile(context.Background(), profileId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ProfilesAPI.GetProfile``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetProfile`: Profile
	fmt.Fprintf(os.Stdout, "Response from `ProfilesAPI.GetProfile`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
profileId string The UUID of the profile, or "default" for the default profile.

Other Parameters

Other parameters are passed through a pointer to a apiGetProfileRequest struct via the builder pattern

Name Type Description Notes

Return type

Profile

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetProfileBalance

ProfileBalance GetProfileBalance(ctx, profileId, asset).Execute()

Get Profile Balance

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/avianlabs/paxos-go"
)

func main() {
	profileId := "profileId_example" // string | 
	asset := "asset_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ProfilesAPI.GetProfileBalance(context.Background(), profileId, asset).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ProfilesAPI.GetProfileBalance``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetProfileBalance`: ProfileBalance
	fmt.Fprintf(os.Stdout, "Response from `ProfilesAPI.GetProfileBalance`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
profileId string
asset string

Other Parameters

Other parameters are passed through a pointer to a apiGetProfileBalanceRequest struct via the builder pattern

Name Type Description Notes

Return type

ProfileBalance

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListProfileBalances

ListProfileBalancesResponse ListProfileBalances(ctx, profileId).Assets(assets).Execute()

List Profile Balances

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/avianlabs/paxos-go"
)

func main() {
	profileId := "profileId_example" // string | 
	assets := []string{"Assets_example"} // []string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ProfilesAPI.ListProfileBalances(context.Background(), profileId).Assets(assets).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ProfilesAPI.ListProfileBalances``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListProfileBalances`: ListProfileBalancesResponse
	fmt.Fprintf(os.Stdout, "Response from `ProfilesAPI.ListProfileBalances`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
profileId string

Other Parameters

Other parameters are passed through a pointer to a apiListProfileBalancesRequest struct via the builder pattern

Name Type Description Notes

assets | []string | |

Return type

ListProfileBalancesResponse

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListProfiles

ListProfilesResponse ListProfiles(ctx).CreatedAtLt(createdAtLt).CreatedAtLte(createdAtLte).CreatedAtEq(createdAtEq).CreatedAtGte(createdAtGte).CreatedAtGt(createdAtGt).Limit(limit).Order(order).OrderBy(orderBy).PageCursor(pageCursor).Execute()

List Profiles

Example

package main

import (
	"context"
	"fmt"
	"os"
    "time"
	openapiclient "github.com/avianlabs/paxos-go"
)

func main() {
	createdAtLt := time.Now() // time.Time | Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. (optional)
	createdAtLte := time.Now() // time.Time | Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. (optional)
	createdAtEq := time.Now() // time.Time | Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. (optional)
	createdAtGte := time.Now() // time.Time | Include timestamps greater than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. (optional)
	createdAtGt := time.Now() // time.Time | Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. (optional)
	limit := int32(56) // int32 | Number of results to return. (optional)
	order := "order_example" // string | Return items in ascending (ASC) or descending (DESC) order. Defaults to ASC. (optional)
	orderBy := "orderBy_example" // string | The specific method by which the returned results will be ordered. (optional)
	pageCursor := "pageCursor_example" // string | Cursor token for fetching the next page. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ProfilesAPI.ListProfiles(context.Background()).CreatedAtLt(createdAtLt).CreatedAtLte(createdAtLte).CreatedAtEq(createdAtEq).CreatedAtGte(createdAtGte).CreatedAtGt(createdAtGt).Limit(limit).Order(order).OrderBy(orderBy).PageCursor(pageCursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ProfilesAPI.ListProfiles``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListProfiles`: ListProfilesResponse
	fmt.Fprintf(os.Stdout, "Response from `ProfilesAPI.ListProfiles`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListProfilesRequest struct via the builder pattern

Name Type Description Notes
createdAtLt time.Time Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`.
createdAtLte time.Time Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`.
createdAtEq time.Time Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`.
createdAtGte time.Time Include timestamps greater than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`.
createdAtGt time.Time Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`.
limit int32 Number of results to return.
order string Return items in ascending (ASC) or descending (DESC) order. Defaults to ASC.
orderBy string The specific method by which the returned results will be ordered.
pageCursor string Cursor token for fetching the next page.

Return type

ListProfilesResponse

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]