Documentation ¶
Overview ¶
Package upvest provides the binding for Upvest REST APIs. Where possible, the services available on the client groups the API into logical chunks and correspond to the structure of the Upvest API documentation at https://doc.upvest.co/reference.
First, create an Upvest client and depending on what action to take, you either create tenancy or clientele client. All tenancy related operations must be authenticated using the API Keys Authentication, whereas all actions on a user's behalf need to be authenticated via OAuth. The API calls are built along with those two authentication objects.
Usage:
// NewClient creates a new Upvest API client with the given base URL // and HTTP client, allowing overriding of the HTTP client to use. // This is useful if you're running in a Google AppEngine environment // where the http.DefaultClient is not available. c := NewClient("", nil) // Tenant API - API Keys Authentication // The Upvest API uses the notion of _tenants_, which represent customers that build their platform upon the Upvest API. // The authentication via API keys and secret allows you to perform all tenant related operations. tenancyClient = c.NewTenant(apiKey, apiSecret, apiPassphrase) // create a user user, err := tenancyClient.User.Create(username, randomString(12)) if err != nil { t.Errorf("CREATE User returned error: %v", err) } // list users users, err := tenancyClient.User.List() if err != nil { t.Errorf("List Users returned error: %v", err) } // retrieve 20 users users, err := tenancyClient.User.ListN(20) if err != nil { t.Errorf("List Users returned error: %v", err) } // change password user, err = tenancyClient.User.Update(username, params) // Clinetele API - OAuth Authentication // The authentication via OAuth allows you to perform operations on behalf of your user. // For more information on the OAuth concept, please refer to our documentation at https://doc.upvest.co/docs/oauth2-authentication // Next, create an `Clientele` object with these credentials // and your user authentication data in order to authenticate your API calls on behalf of a user: clienteleClient = c.NewClientele(clientID, clientSecret, username, password) wp := &WalletParams{ Password: staticUserPW, AssetID: ethWallet.Balances[0].AssetID, } // create the wallet wallet, err := clienteleTestClient.Wallet.Create(wp) if err != nil { t.Errorf("CREATE Wallet returned error: %v", err) } // // retrieve the wallet wallet1, err := clienteleTestClient.Wallet.Get(wallet.ID) if err != nil { t.Errorf("GET Wallet returned error: %v", err) }
Index ¶
- Constants
- type Asset
- type AssetList
- type AssetService
- type AuthProvider
- type Balance
- type ChangePasswordParams
- type Client
- func (c *Client) Call(method, path string, body, v interface{}, p *Params) error
- func (c *Client) NewClientele(clientID, clientSecret, username, password string) *ClienteleAPI
- func (c *Client) NewRequest(method, path string, body interface{}, params *Params) (*http.Request, error)
- func (c *Client) NewTenant(apiKey, apiSecret, apiPassphrase string) *TenancyAPI
- func (c *Client) SetUA(userAgent string)
- type ClienteleAPI
- type DataParams
- type Error
- type ErrorType
- type EventFilter
- type EventFilterScope
- type HDBalance
- type HDBlock
- type HDStatus
- type HDTransaction
- type HDTransactionList
- type Headers
- type HistoricalDataService
- func (s *HistoricalDataService) GetAssetBalance(protocol, network, address string) (*HDBalance, error)
- func (s *HistoricalDataService) GetBlock(protocol, network, blockNumber string) (*HDBlock, error)
- func (s *HistoricalDataService) GetContractBalance(protocol, network, address, contractAddr string) (*HDBalance, error)
- func (s *HistoricalDataService) GetStatus(protocol, network string) (*HDStatus, error)
- func (s *HistoricalDataService) GetTransactions(protocol, network, address string, opts *TxFilters) (*HDTransactionList, error)
- func (s *HistoricalDataService) GetTxByHash(protocol, network, txhash string) (*HDTransaction, error)
- type KeyAuth
- type ListMeta
- type Logger
- type OAuth
- type OAuthResponse
- type Params
- type Response
- type Signature
- type SignatureParams
- type TenancyAPI
- type Transaction
- type TransactionList
- type TransactionParams
- type TransactionService
- func (s *TransactionService) Create(walletID string, tp *TransactionParams) (*Transaction, error)
- func (s *TransactionService) CreateComplex(walletID string, password string, tx DataParams, fund bool) (*Transaction, error)
- func (s *TransactionService) CreateRaw(walletID string, password string, rawTx DataParams, fund bool, ...) (*Transaction, error)
- func (s *TransactionService) Get(walletID, txnID string) (*Transaction, error)
- func (s *TransactionService) List(walletID string) (*TransactionList, error)
- type TxFilters
- type User
- type UserList
- type UserService
- func (s *UserService) ChangePassword(username string, params *ChangePasswordParams) (*User, error)
- func (s *UserService) Create(username, password string, assetIDs []string) (*User, error)
- func (s *UserService) Delete(username string) error
- func (s *UserService) Get(username string) (*User, error)
- func (s *UserService) List() (*UserList, error)
- func (s *UserService) ListN(count int) (*UserList, error)
- type Wallet
- type WalletList
- type WalletParams
- type WalletService
- func (s *WalletService) Create(wp *WalletParams) (*Wallet, error)
- func (s *WalletService) Get(walletID string) (*Wallet, error)
- func (s *WalletService) List() (*WalletList, error)
- func (s *WalletService) ListN(count int) (*WalletList, error)
- func (s *WalletService) Sign(walletID string, sp *SignatureParams) (*Signature, error)
- type Webhook
- type WebhookList
- type WebhookParams
- type WebhookService
- func (s *WebhookService) Create(wh *WebhookParams) (*Webhook, error)
- func (s *WebhookService) Delete(webhookID string) error
- func (s *WebhookService) Get(webhookID string) (*Webhook, error)
- func (s *WebhookService) List() (*WebhookList, error)
- func (s *WebhookService) ListN(count int) (*WebhookList, error)
- func (s *WebhookService) Verify(url string) bool
Constants ¶
const ( ErrInvalidRequest ErrorType = "invalid_request_error" ErrAuthorization = "authorization_error" ErrAuthentication = "authentication_error" ErrDuplicateUser = "duplicate_user" ErrServer = "server_error" )
List of values that ErrorType can take.
const ( // DefaultHTTPTimeout is the default timeout on the http client DefaultHTTPTimeout = 60 * time.Second // DefaultBaseURL for all requests. default to playground environment DefaultBaseURL = "https://api.playground.upvest.co/" // APIVersion is the currently supported API version APIVersion = "1.0" // Encoding is the text encoding to use Encoding = "utf-8" // MaxPageSize is the maximum page size when retrieving list MaxPageSize = 100 )
const (
// URLEncodeHeader is the content-type header for OuAth2
URLEncodeHeader = "application/x-www-form-urlencoded"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ID string `json:"id"` Name string `json:"name"` Symbol string `json:"symbol"` Exponent int64 `json:"exponent"` Protocol string `json:"protocol"` MetaData map[string]interface{} `json:"metadata"` }
Asset is the resource representing your Upvest Tenant asset. For more details see https://doc.upvest.co/reference#assets
type AssetService ¶
type AssetService struct {
// contains filtered or unexported fields
}
AssetService handles operations related to the asset For more details see https://doc.upvest.co/reference#assets/
func (*AssetService) Get ¶
func (s *AssetService) Get(assetID string) (*Asset, error)
Get returns the details of a asset. For more details see https://doc.upvest.co/reference#common_assets_read
func (*AssetService) List ¶
func (s *AssetService) List() (*AssetList, error)
List returns list of all assets. For more details see https://doc.upvest.co/reference#asset
type AuthProvider ¶
type AuthProvider interface { // GetHeaders returns authorization headers (or other info) to be attached to requests. GetHeaders(method, path string, body interface{}, c *Client) (Headers, error) }
AuthProvider interface for authentication mechanisms supported by Upvest API
type Balance ¶
type Balance struct { Amount int64 `json:"amount"` AssetID string `json:"asset_id"` Name string `json:"name"` Symbol string `json:"symbol"` Exponent int `json:"exponent"` }
Balance has a quantity and an asset
type ChangePasswordParams ¶
type ChangePasswordParams struct { //Params `json:"-"` OldPassword string `json:"old_password"` NewPassword string `json:"new_password"` }
ChangePasswordParams is the set of parameters that can be used when changing user password For more details see https://doc.upvest.co/reference#tenancy_user_password_update
type Client ¶
Client manages communication with the Upvest API Service specific actions are implemented on resource services mapped to the Upvest API. Miscellaneous actions are directly implemented on the Client object
func NewClient ¶
NewClient creates a new Upvest API client with the given base URL and HTTP client, allowing overriding of the HTTP client to use. This is useful if you're running in a Google AppEngine environment where the http.DefaultClient is not available.
func (*Client) Call ¶
Call actually does the HTTP request to Upvest API TODO: refactor additional params into Param struct
func (*Client) NewClientele ¶
func (c *Client) NewClientele(clientID, clientSecret, username, password string) *ClienteleAPI
NewClientele creates a new clientele for interacting with your Upvest clients/users
func (*Client) NewRequest ¶
func (c *Client) NewRequest(method, path string, body interface{}, params *Params) (*http.Request, error)
NewRequest is used by Call to generate an http.Request. It handles encoding parameters and attaching the appropriate headers.
func (*Client) NewTenant ¶
func (c *Client) NewTenant(apiKey, apiSecret, apiPassphrase string) *TenancyAPI
NewTenant creates a new tenant for interacting with your Upvest tenant
type ClienteleAPI ¶
type ClienteleAPI struct { Wallet *WalletService Transaction *TransactionService }
ClienteleAPI represents Upvest Clientele API For more details, please see https://doc.upvest.co/reference#clientele
type DataParams ¶
type DataParams map[string]interface{}
type Error ¶
type Error struct { Type ErrorType `json:"type,omitempty"` Message string `json:"message,omitempty"` StatusCode int `json:"code,omitempty"` Details map[string]interface{} `json:"details,omitempty"` URL *url.URL `json:"url,omitempty"` Header http.Header `json:"header,omitempty"` }
Error represents an error response from the Upvest API server
type ErrorType ¶
type ErrorType string
ErrorType is represents the allowed values for the error's type.
type EventFilter ¶
type EventFilter struct { EventNoun string `json:"event_noun"` EventVerb string `json:"event_verb"` LimitToApplication bool `json:"limit_to_application"` MaxConfirmations int `json:"max_confirmations"` ProtocolName string `json:"procol_name"` WalletAddress string `json:"wallet_address"` }
EventFilter represents serialized event filter as returned from the server
type EventFilterScope ¶
type EventFilterScope string
EventFilterScope represents one of the configured event filter scopes
type HDBalance ¶
type HDBalance struct { ID string `json:"id"` Address string `json:"address"` Contract string `json:"contract"` Balance string `json:"balance"` TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionindex"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` Timestamp string `json:"timestamp"` IsMainChain bool `json:"isMainChain"` }
HDBalance reprents balance of an asset or contract if native asset balance,contract is set to address of the contract
type HDBlock ¶
type HDBlock struct { Number string `json:"number"` Hash string `json:"hash"` ParentHash string `json:"parentHash"` Nonce string `json:"nonce"` Sha3Uncles string `json:"sha3Uncles"` LogsBloom string `json:"logsBloom"` TransactionsRoot string `json:"transactionsRoot"` StateRoot string `json:"stateRoot"` ReceiptsRoot string `json:"receiptsRoot"` Miner string `json:"miner"` Difficulty string `json:"difficulty"` TotalDifficulty string `json:"totalDifficulty"` ExtraData string `json:"extraData"` Size string `json:"size"` GasLimit string `json:"gasLimit"` GasUsed string `json:"gasUsed"` Transactions []string `json:"transactions"` Timestamp string `json:"timestamp"` Uncles []string `json:"uncles"` }
HDBlock represents block object from historical data API
type HDStatus ¶
type HDStatus struct { Lowest string `json:"lowest"` Highest string `json:"highest"` Latest string `json:"latest"` }
HDStatus represents historical data API status object
type HDTransaction ¶
type HDTransaction struct { BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` From string `json:"from"` Gas string `json:"gas"` Hash string `json:"hash"` Nonce string `json:"nonce"` TransactionIndex string `json:"transactionIndex"` To string `json:"to"` Value string `json:"value"` GasPrice string `json:"gasPrice"` Input string `json:"input"` Confirmations int `json:"confirmations"` }
HDTransaction represents transaction object from historical data API
type HDTransactionList ¶
type HDTransactionList struct { Values []HDTransaction `json:"result"` NextCursor string `json:"next_cursor"` }
HDTransactionList is a list of HDTransaction objects
type HistoricalDataService ¶
type HistoricalDataService struct {
// contains filtered or unexported fields
}
HistoricalDataService handles operations related to the historical data
func (*HistoricalDataService) GetAssetBalance ¶
func (s *HistoricalDataService) GetAssetBalance(protocol, network, address string) (*HDBalance, error)
GetAssetBalance returns native asset balance by address
func (*HistoricalDataService) GetBlock ¶
func (s *HistoricalDataService) GetBlock(protocol, network, blockNumber string) (*HDBlock, error)
GetBlock returns block details by blockNumber
func (*HistoricalDataService) GetContractBalance ¶
func (s *HistoricalDataService) GetContractBalance(protocol, network, address, contractAddr string) (*HDBalance, error)
GetContractBalance returns contract balance by address
func (*HistoricalDataService) GetStatus ¶
func (s *HistoricalDataService) GetStatus(protocol, network string) (*HDStatus, error)
GetStatus return Historical Data API status
func (*HistoricalDataService) GetTransactions ¶
func (s *HistoricalDataService) GetTransactions(protocol, network, address string, opts *TxFilters) (*HDTransactionList, error)
GetTransactions returns transactions that have been sent to and received by an address
func (*HistoricalDataService) GetTxByHash ¶
func (s *HistoricalDataService) GetTxByHash(protocol, network, txhash string) (*HDTransaction, error)
GetTxByHash transaction (single) by txhash
type KeyAuth ¶
type KeyAuth struct {
// contains filtered or unexported fields
}
KeyAuth (The API Key Authentication) is used to authenticate requests as a tenant.
type Logger ¶
type Logger interface {
Printf(format string, v ...interface{})
}
Logger interface for custom loggers
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
OAuth (The OAuth2 Key Authentication) is used to authenticate requests on behalf of a user
type OAuthResponse ¶
type OAuthResponse struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` TokenType string `json:"token_type"` Scope string `json:"scope"` RefreshToken string `json:"refresh_token"` }
OAuthResponse represents succesful OAuth response
type Params ¶
type Params struct { // AuthProvider for authenticating the request AuthProvider AuthProvider `json:"-"` // Headers may be used to provide extra header lines on the HTTP request. Headers http.Header `json:"-"` }
Params is the structure that contains the common properties of any *Params structure.
func NewParams ¶
func NewParams(auth AuthProvider) *Params
NewParams creates a new param object with the given auth provider
func (*Params) SetAuthProvider ¶
func (p *Params) SetAuthProvider(auth AuthProvider)
SetAuthProvider sets a value for the auth mechanism
type Signature ¶
type Signature struct { // Has the same value as the "output_format" parameter. // The name of the string format for the big numbers in the signature. (Some JSON implementations can not handle integers which need more than 64 bits to be represented.) BigNumberFormat string `json:"big_number_format"` // The encryption algorithm used. (Currently only ECDSA) Algorithm string `json:"algorithm"` // The name of the elliptic curve used. Curve string `json:"curve"` // The x coordinate of the public key of the wallet PublicKey map[string]interface{} `json:"public_key"` // The "r" signature component. // Represented in the format given in the "big_number_format" field. R string `json:"r"` // The "s" signature component. // Represented in the format given in the "big_number_format" field. S string `json:"s"` // The "recover" signature component, sometimes also called "v". // Since this is a small integer with less than 64 bits, this is an actual JSON integer, and NOT represented in the big integer format. Recover string `json:"recover"` }
Signature represents the signed wallet signature For more details, see https://doc.upvest.co/reference#kms_sign
type SignatureParams ¶
type SignatureParams struct { //Params `json:"-"` Password string `json:"password"` ToSign string `json:"to_sign"` InputFormat string `json:"input_format,omitempty"` OutputFormat string `json:"output_format,omitempty"` }
SignatureParams is the set of parameters that can be used when signing a wallet For more details see https://doc.upvest.co/reference#kms_sign
type TenancyAPI ¶
type TenancyAPI struct { User *UserService Asset *AssetService Webhook *WebhookService Historical *HistoricalDataService }
TenancyAPI represents Upvest tenancy API For more details, please see https://doc.upvest.co/reference#tenancy
type Transaction ¶
type Transaction struct { ID string `json:"id"` TxHash string `json:"txhash"` WalletID string `json:"wallet_id"` AssetID string `json:"asset_id"` AssetName string `json:"asset_name"` Exponent string `json:"exponent"` Sender string `json:"sender"` Recipient string `json:"recipient"` Quantity string `json:"quantity"` Fee string `json:"fee"` Status string `json:"status"` }
Transaction represents a wallet transaction For more details, see https://doc.upvest.co/reference#kms_transaction_create
type TransactionList ¶
type TransactionList struct { Meta ListMeta Values []Transaction `json:"results"` }
TransactionList is a list object for transactions
type TransactionParams ¶
type TransactionParams struct { Password string `json:"password"` AssetID string `json:"asset_id"` Quantity int64 `json:"quantity"` Fee int64 `json:"fee"` Recipient string `json:"recipient"` }
TransactionParams is the set of parameters that can be used when creating a transaction For more details see https://doc.upvest.co/reference#kms_transaction_create
type TransactionService ¶
type TransactionService struct {
// contains filtered or unexported fields
}
TransactionService handles operations related to the transaction For more details see https://doc.upvest.co/reference#kms_transaction_create
func (*TransactionService) Create ¶
func (s *TransactionService) Create(walletID string, tp *TransactionParams) (*Transaction, error)
Create creates a new transaction For more details https://doc.upvest.co/reference#kms_transaction_create
func (*TransactionService) CreateComplex ¶
func (s *TransactionService) CreateComplex(walletID string, password string, tx DataParams, fund bool) (*Transaction, error)
CreateComplex creates a complex transaction For more details https://doc.upvest.co/docs/complex-transactions
func (*TransactionService) CreateRaw ¶
func (s *TransactionService) CreateRaw(walletID string, password string, rawTx DataParams, fund bool, inputFormat string) (*Transaction, error)
CreateRaw creates a raw transaction For more details https://doc.upvest.co/docs/complex-transactions
func (*TransactionService) Get ¶
func (s *TransactionService) Get(walletID, txnID string) (*Transaction, error)
Get returns the details of a transaction. For more details see https://doc.upvest.co/reference#kms_transactions_read
func (*TransactionService) List ¶
func (s *TransactionService) List(walletID string) (*TransactionList, error)
List returns list of all transactions. For more details see https://doc.upvest.co/reference#kms_transaction_list
type TxFilters ¶
type TxFilters struct { Before string `url:"before,omitempty"` After string `url:"after,omitempty"` Confirmations int `url:"confirmations,omitempty"` Cursor string `url:"cursor"` Limit int `url:"limit,omitempty"` }
TxFilters is for filtering historical Data API queries
type User ¶
type User struct { Username string `json:"username,omitempty"` RecoveryKit string `json:"recoverykit,omitempty"` WalletIDs map[int]string `json:"wallet_ids,omitempty"` }
User is the resource representing your Upvest Tenant user. For more details see https://doc.upvest.co/reference#tenancy_user_create
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService handles operations related to the user For more details see https://doc.upvest.co/reference#tenancy_user_create
func (*UserService) ChangePassword ¶
func (s *UserService) ChangePassword(username string, params *ChangePasswordParams) (*User, error)
ChangePassword changes user password with the provided password For more details https://doc.upvest.co/reference#tenancy_user_password_update
func (*UserService) Create ¶
func (s *UserService) Create(username, password string, assetIDs []string) (*User, error)
Create creates a new user For more details https://doc.upvest.co/reference#tenancy_user_create
func (*UserService) Delete ¶
func (s *UserService) Delete(username string) error
Delete permanently deletes a user For more details https://doc.upvest.co/reference#tenancy_user_create
func (*UserService) Get ¶
func (s *UserService) Get(username string) (*User, error)
Get returns the details of a user. For more details see
func (*UserService) List ¶
func (s *UserService) List() (*UserList, error)
List returns list of all users. For more details see https://doc.upvest.co/reference#tenancy_user_list
func (*UserService) ListN ¶
func (s *UserService) ListN(count int) (*UserList, error)
ListN returns a specific number of users For more details see https://doc.upvest.co/reference#tenancy_user_list
type Wallet ¶
type Wallet struct { ID string `json:"id"` Path string `json:"path"` Balances []Balance `json:"balances"` Protocol string `json:"protocol"` Address string `json:"address"` Status string `json:"status"` Index int64 `json:"index"` }
Wallet represents an Upvest wallet
type WalletList ¶
WalletList is a list object for wallets.
type WalletParams ¶
type WalletParams struct { //Params `json:"-"` Password string `json:"password"` AssetID string `json:"asset_id"` Type string `json:"type,omitempty"` Index int `json:"index,omitempty"` }
WalletParams is the set of parameters that can be used when creating or updating a wallet For more details see https://doc.upvest.co/reference#kms_wallet_create
type WalletService ¶
type WalletService struct {
// contains filtered or unexported fields
}
WalletService handles operations related to the wallet For more details see https://doc.upvest.co/reference#kms_wallet_create
func (*WalletService) Create ¶
func (s *WalletService) Create(wp *WalletParams) (*Wallet, error)
Create creates a new wallet For more details https://doc.upvest.co/reference#kms_wallet_create
func (*WalletService) Get ¶
func (s *WalletService) Get(walletID string) (*Wallet, error)
Get returns the details of a wallet. For more details see https://doc.upvest.co/reference#kms_wallets_read
func (*WalletService) List ¶
func (s *WalletService) List() (*WalletList, error)
List returns list of all wallets. For more details see https://doc.upvest.co/reference#wallet
func (*WalletService) ListN ¶
func (s *WalletService) ListN(count int) (*WalletList, error)
ListN returns a specific number of wallets For more details see https://doc.upvest.co/reference#tenancy_wallet_list
func (*WalletService) Sign ¶
func (s *WalletService) Sign(walletID string, sp *SignatureParams) (*Signature, error)
Sign signs (the hash of) data with the private key corresponding to this wallet. For more details, see https://doc.upvest.co/reference#kms_sign
type Webhook ¶
type Webhook struct { ID string `json:"id"` URL string `json:"url"` Name string `json:"name"` HMACSecretKey string `json:"hmac_secret_key"` Headers map[string]string `json:"headers"` Version string `json:"version"` Status string `json:"status"` //EventFilters []map[string]EventFilter `json:"event_filters"` // TODO: report inconsistent response schema. event filters should be: [string -> map] // temporarily decode to generic interface EventFilters []interface{} `json:"event_filters"` }
Webhook represents an Upvest webhook
type WebhookList ¶
WebhookList is a list object for webhooks.
type WebhookParams ¶
type WebhookParams struct { URL string `json:"url"` Name string `json:"name"` HMACSecretKey string `json:"hmac_secret_key"` Headers map[string]string `json:"headers"` Version string `json:"version"` Status string `json:"status"` // An array of platform, noun and verb combinations capturing desired events. EventFilters []EventFilterScope `json:"event_filters"` }
WebhookParams is the set of parameters that can be used when creating a webhook
type WebhookService ¶
type WebhookService struct {
// contains filtered or unexported fields
}
WebhookService handles operations related to the webhook
func (*WebhookService) Create ¶
func (s *WebhookService) Create(wh *WebhookParams) (*Webhook, error)
Create creates a new webhook Unlike other resource enndpoints, we can use the same webhook struct to create a new one as the parameters required to create a new one is basically all the fields in the webhook struct. Only difference being that it has not yet been saved on Upvest backend TODO: validate params
func (*WebhookService) Delete ¶
func (s *WebhookService) Delete(webhookID string) error
Delete permanently deletes a webhook
func (*WebhookService) Get ¶
func (s *WebhookService) Get(webhookID string) (*Webhook, error)
Get retrives and returns a webhook object.
func (*WebhookService) List ¶
func (s *WebhookService) List() (*WebhookList, error)
List returns list of all webhooks.
func (*WebhookService) ListN ¶
func (s *WebhookService) ListN(count int) (*WebhookList, error)
ListN returns a specific number of webhooks