godaddy.countries
ballerinax/godaddy.countries Ballerina library
Overview
The GoDaddy Countries API v1 connector(https://developer.godaddy.com/doc/endpoint/countries) OpenAPI specification.
The GoDaddy Countries API provides capability to access GoDaddy operations related to country information.
Key Features
- Programmatic access to create and manage resources via REST API
- Manage user accounts and profiles
- Secure authentication with API key or OAuth support
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create an GoDaddy account
- Obtain tokens
- Follow this link to obtain tokens
Clients
godaddy.countries: Client
This is a generated connector for GoDaddy Countries API v1 OpenAPI specification. The GoDaddy Countries API provides capability to access GoDaddy operations related to countries.
Constructor
Gets invoked to initialize the connector.
The connector initialization requires setting the API credentials.
Create a GoDaddy and obtain tokens by following this guide.
init (ApiKeysConfig apiKeyConfig, ConnectionConfig config, string serviceUrl)- apiKeyConfig ApiKeysConfig - API keys for authorization
- config ConnectionConfig {} - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.ote-godaddy.com" - URL of the target service
getCountries
function getCountries(string marketId, int? regionTypeId, string? regionName, string sort, string 'order) returns ArrayOfCountrySummary|errorRetrieves summary country information for the provided marketId and filters
Parameters
- marketId string - MarketId in which the request is being made, and for which responses should be localized
- regionTypeId int? (default ()) - Restrict countries to this region type; required if regionName is supplied
- regionName string? (default ()) - Restrict countries to this region name; required if regionTypeId is supplied
- sort string (default "key") - The term to sort the result countries by.
- 'order string (default "ascending") - The direction to sort the result countries by.
Return Type
- ArrayOfCountrySummary|error - Request was successful
getCountry
function getCountry(string countryKey, string marketId, string sort, string 'order) returns ArrayOfCountry|errorRetrieves country and summary state information for provided countryKey
Parameters
- countryKey string - The country key
- marketId string - MarketId in which the request is being made, and for which responses should be localized
- sort string (default "key") - The term to sort the result country states by.
- 'order string (default "ascending") - The direction to sort the result country states by.
Return Type
- ArrayOfCountry|error - Request was successful
Records
godaddy.countries: ApiKeysConfig
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- authorization string - Represents API Key 'Authorization'
godaddy.countries: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy? ProxyConfig - Proxy server related options
godaddy.countries: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings? ClientHttp1Settings - Configurations related to HTTP/1.x protocol
- http2Settings? ClientHttp2Settings - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache? CacheConfig - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- responseLimits? ResponseLimitConfigs - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
godaddy.countries: Country
Fields
- callingCode? string - The calling code prefix used for phone numbers in this country
- countryKey? string - The ISO country-code
- label? string - The localized name of the country
- states? State[] - List of states/provinces in this country
godaddy.countries: CountrySummary
Fields
- callingCode? string - The calling code prefix used for phone numbers in this country
- countryKey? string - The ISO country-code
- label? string - The localized name of the country
godaddy.countries: Error
Fields
- code string - Short identifier for the error, suitable for indicating the specific error within client code
- fields? ErrorField[] - List of the specific fields, and the errors found with their contents
- message? string - Human-readable, English description of the error
- stack? string[] - Stack trace indicating where the error occurred.<br/> NOTE: This attribute <strong>MAY</strong> be included for Development and Test environments. However, it <strong>MUST NOT</strong> be exposed from OTE nor Production systems
godaddy.countries: ErrorField
Fields
- code string - Short identifier for the error, suitable for indicating the specific error within client code
- message? string - Human-readable, English description of the problem with the contents of the field
- path string - JSONPath referring to the field within the submitted data containing an error
godaddy.countries: ErrorLimit
Fields
- code string - Short identifier for the error, suitable for indicating the specific error within client code
- fields? ErrorField[] - List of the specific fields, and the errors found with their contents
- message? string - Human-readable, English description of the error
- retryAfterSec int - Number of seconds to wait before attempting a similar request
- stack? string[] - Stack trace indicating where the error occurred.<br/> NOTE: This attribute <strong>MAY</strong> be included for Development and Test environments. However, it <strong>MUST NOT</strong> be exposed from OTE nor Production systems
godaddy.countries: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
godaddy.countries: State
Fields
- label? string - The localized name of the state, province, or territory
- stateKey? string - The state code
Array types
godaddy.countries: ArrayOfCountrySummary
ArrayOfCountrySummary
godaddy.countries: ArrayOfCountry
ArrayOfCountry
Import
import ballerinax/godaddy.countries;Metadata
Released date: 3 days ago
Version: 1.5.2
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.8.0
GraalVM compatible: Yes
Pull count
Total: 26
Current verison: 0
Weekly downloads
Keywords
Type/Connector
Vendor/GoDaddy
Area/Developer Tools
Website & App Building/Website Builders
Cost/Paid
Contributors
Dependencies