Documentation ¶
Index ¶
- type APIClient
- func (c *APIClient) CallAPI(path string, method string, postBody interface{}, ...) (*resty.Response, error)
- func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string
- func (c *APIClient) SelectHeaderAccept(accepts []string) string
- func (c *APIClient) SelectHeaderContentType(contentTypes []string) string
- type APIResponse
- type ClientCredentials
- type ClientsApi
- type Configuration
- type ErrorsCollection
- type Hook
- type HooksApi
- func (a HooksApi) CreateHook(userKey string, authorization string, v2Hooks PostV2Hooks, xHookSecret string) (*Hook, *APIResponse, error)
- func (a HooksApi) DeleteHook(userKey string, authorization string, hookId string) (*APIResponse, error)
- func (a HooksApi) GetAllHooks(userKey string, authorization string) (*HooksCollection, *APIResponse, error)
- type HooksCollection
- type ModelError
- type OAuth2Token
- type Oauth2Api
- type PostV2Hooks
- type SchemasApi
- type Search
- type SearchesApi
- type SearchesCollection
- type Swagger_docApi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
func (*APIClient) ParameterToString ¶
func (*APIClient) SelectHeaderAccept ¶
func (*APIClient) SelectHeaderContentType ¶
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type ClientCredentials ¶
type ClientCredentials struct { // Id of the client ClientId string `json:"client_id,omitempty"` // The secret of the client ClientSecret string `json:"client_secret,omitempty"` }
Register new client Creates a new pair of client credentials (`client_id`/`client_secret` pair). Requires your Meltwater credentials (`email`:`password`) to authenticate. #### Appendix The Base64-encoded `email`:`password` string can be generated in a terminal with following command: $ echo -n \"your_email@your_domain.com:your_secret_password\" | base64 <i>You will need `base64` installed.</i>
type ClientsApi ¶
type ClientsApi struct {
Configuration *Configuration
}
func NewClientsApi ¶
func NewClientsApi() *ClientsApi
func NewClientsApiWithBasePath ¶
func NewClientsApiWithBasePath(basePath string) *ClientsApi
func (ClientsApi) CreateClientCredentials ¶
func (a ClientsApi) CreateClientCredentials(userKey string, authorization string) (*ClientCredentials, *APIResponse, error)
*
- Register new client
- Register new client Creates a new pair of client credentials (`client_id`/`client_secret` pair). Requires your Meltwater credentials (`email`:`password`) to authenticate. #### Appendix The Base64-encoded `email`:`password` string can be generated in a terminal with following command: $ echo -n \"your_email@your_domain.com:your_secret_password\" | base64 <i>You will need `base64` installed.</i> *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @param authorization `email`:`password` Basic Auth (RFC2617) credentials. Must contain the realm `Basic` followed by a Base64-encoded `email`:`password` pair using your Meltwater credentials. #### Example: Basic bXlfZW1haWxAZXhhbXJzZWNyZXQ=
- @return *ClientCredentials
func (ClientsApi) DeleteClientCredentials ¶
func (a ClientsApi) DeleteClientCredentials(userKey string, authorization string, clientId string) (*APIResponse, error)
*
- Delete client.
- Delete client. Deletes your current client credentials consisting of client_id and client_secret. After calling this resource, you will not be able to use the Meltwater API unless you create a new set of client credentials! Requires your Meltwater credentials (`email`:`password`) to authenticate. #### Appendix The Base64-encoded `email`:`password` string can be generated in a terminal with following command: $ echo -n \"your_email@your_domain.com:your_secret_password\" | base64 <i>You will need `base64` installed.</i> *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @param authorization `email`:`password` Basic Auth (RFC2617) credentials. Must contain the realm `Basic` followed by a Base64-encoded `email`:`password` pair using your Meltwater credentials. #### Example: Basic bXlfZW1haWxAZXhhbXJzZWNyZXQ=
- @param clientId Client ID
- @return void
type Configuration ¶
type Configuration struct { Username string `json:"userName,omitempty"` Password string `json:"password,omitempty"` APIKeyPrefix map[string]string `json:"APIKeyPrefix,omitempty"` APIKey map[string]string `json:"APIKey,omitempty"` Debug bool `json:"debug,omitempty"` DebugFile string `json:"debugFile,omitempty"` OAuthToken string `json:"oAuthToken,omitempty"` BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` AccessToken string `json:"accessToken,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` APIClient *APIClient Transport *http.Transport Timeout *time.Duration `json:"timeout,omitempty"` }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
func (*Configuration) GetAPIKeyWithPrefix ¶
func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string
func (*Configuration) GetBasicAuthEncodedString ¶
func (c *Configuration) GetBasicAuthEncodedString() string
type ErrorsCollection ¶
type ErrorsCollection struct {
Errors []ModelError `json:"errors,omitempty"`
}
List your saved searches.
type Hook ¶
type Hook struct { // Search id SearchId int32 `json:"search_id,omitempty"` // The URL that results from the search will be posted to TargetUrl string `json:"target_url,omitempty"` Updated string `json:"updated,omitempty"` // The type of search the hook is for SearchType string `json:"search_type,omitempty"` HookId string `json:"hook_id,omitempty"` }
Creates a hook for one of your predefined searches. Delivers search results for the query referenced by the `search_id` to the `target_url` via HTTP POST. Note that a `hook_id` will be returned on successful creation, this id is needed to delete the hook. We are also returning the header: `X-Hook-Secret`, a shared secret used to sign the document body pushed to your `target_url`. Requires an OAuth access token.
type HooksApi ¶
type HooksApi struct {
Configuration *Configuration
}
func NewHooksApi ¶
func NewHooksApi() *HooksApi
func NewHooksApiWithBasePath ¶
func (HooksApi) CreateHook ¶
func (a HooksApi) CreateHook(userKey string, authorization string, v2Hooks PostV2Hooks, xHookSecret string) (*Hook, *APIResponse, error)
*
- Creates a hook for one of your predefined searches.
- Creates a hook for one of your predefined searches. Delivers search results for the query referenced by the `search_id` to the `target_url` via HTTP POST. Note that a `hook_id` will be returned on successful creation, this id is needed to delete the hook. We are also returning the header: `X-Hook-Secret`, a shared secret used to sign the document body pushed to your `target_url`. Requires an OAuth access token. *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @param authorization `Oauth Access Token` OAuth access token (RFC 6749). Must contain the access token type `Bearer` followed by an OAuth access token. #### Example: Bearer KKwmfHwxsEoeMDTMAfxOpO...
- @param v2Hooks
- @param xHookSecret Shared secret for content signing/verification. The shared secret header is optional and can be provided by the user or will be set by the API. Must be between 16 and 64 characters. Obtain the shared secret from the response header `X-Hook-Secret`. #### Example: e2d264b524240b9572ebc2fc7eebd980
- @return *Hook
func (HooksApi) DeleteHook ¶
func (a HooksApi) DeleteHook(userKey string, authorization string, hookId string) (*APIResponse, error)
*
- Delete an existing hook.
- Delete an existing hook. Removes the hook and stops sending any search results to the target_url. Requires an OAuth access token. *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @param authorization `Oauth Access Token` OAuth access token (RFC 6749). Must contain the access token type `Bearer` followed by an OAuth access token. #### Example: Bearer KKwmfHwxsEoeMDTMAfxOpO...
- @param hookId Hook ID received from creating a hook
- @return void
func (HooksApi) GetAllHooks ¶
func (a HooksApi) GetAllHooks(userKey string, authorization string) (*HooksCollection, *APIResponse, error)
*
- List all hooks.
- List all hooks. Delivers all previously generated hooks. Requires an OAuth access token. *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @param authorization `Oauth Access Token` OAuth access token (RFC 6749). Must contain the access token type `Bearer` followed by an OAuth access token. #### Example: Bearer KKwmfHwxsEoeMDTMAfxOpO...
- @return *HooksCollection
type HooksCollection ¶
type HooksCollection struct {
Hooks []Hook `json:"hooks,omitempty"`
}
List all hooks. Delivers all previously generated hooks. Requires an OAuth access token.
type ModelError ¶
type OAuth2Token ¶
type OAuth2Token struct { // The oauth2 access token to use for subsequent API calls AccessToken string `json:"access_token,omitempty"` // Time until the token expires in seconds ExpiresIn int32 `json:"expires_in,omitempty"` // The type of oauth2 scope the token is valid for Scope string `json:"scope,omitempty"` // The type/realm of the access token TokenType string `json:"token_type,omitempty"` }
Create an OAuth2 access token based on the provided `client_id` and `client_secret`. #### Appendix The Base64-encoded `client_id`:`client_secret` string can be generated in a terminal with following command: $ echo -n \"your_client_id:your_client_secret\" | base64 <i>You will need `base64` installed.</i>
type Oauth2Api ¶
type Oauth2Api struct {
Configuration *Configuration
}
func NewOauth2Api ¶
func NewOauth2Api() *Oauth2Api
func (Oauth2Api) CreateToken ¶
func (a Oauth2Api) CreateToken(userKey string, authorization string, grantType string, scope string) (*OAuth2Token, *APIResponse, error)
*
- Create an access token
- Create an OAuth2 access token based on the provided `client_id` and `client_secret`. #### Appendix The Base64-encoded `client_id`:`client_secret` string can be generated in a terminal with following command: $ echo -n \"your_client_id:your_client_secret\" | base64 <i>You will need `base64` installed.</i> *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @param authorization `client_id:client_secret` Basic Auth (RFC2617) credentials. Must contain the realm `Basic` followed by a Base64-encoded `client_id`:`client_secret` pair. #### Example: Basic aAlfbb1haWxDSXhhDXxxZWKJAyZXQ=
- @param grantType OAuth2 grant type, use `client_credentials`
- @param scope OAuth2 scope, use `search`
- @return *OAuth2Token
type PostV2Hooks ¶
type PostV2Hooks struct { // Target URL to send article results TargetUrl string `json:"target_url"` // Search ID SearchId int32 `json:"search_id"` }
Creates a hook for one of your predefined searches.
type SchemasApi ¶
type SchemasApi struct {
Configuration *Configuration
}
func NewSchemasApi ¶
func NewSchemasApi() *SchemasApi
func NewSchemasApiWithBasePath ¶
func NewSchemasApiWithBasePath(basePath string) *SchemasApi
func (SchemasApi) GetEditorialStreamingJsonSchema ¶
func (a SchemasApi) GetEditorialStreamingJsonSchema(userKey string) (*APIResponse, error)
*
- Editorial Streaming JSON schema
- Get the JSON schema describing the layout of Editorial Streaming documents. *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @return void
func (SchemasApi) GetSocialStreamingJsonSchema ¶
func (a SchemasApi) GetSocialStreamingJsonSchema(userKey string) (*APIResponse, error)
*
- Social Streaming JSON schema
- Get the JSON schema describing the layout of Social Streaming documents. *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @return void
type Search ¶
type Search struct { // Search id SearchId int32 `json:"search_id,omitempty"` // Name of the search Name string `json:"name,omitempty"` // Date time of the last update of the search Updated string `json:"updated,omitempty"` // The type of results the search returns Type_ string `json:"type,omitempty"` }
type SearchesApi ¶
type SearchesApi struct {
Configuration *Configuration
}
func NewSearchesApi ¶
func NewSearchesApi() *SearchesApi
func NewSearchesApiWithBasePath ¶
func NewSearchesApiWithBasePath(basePath string) *SearchesApi
func (SearchesApi) GetAllSearches ¶
func (a SearchesApi) GetAllSearches(userKey string, authorization string) (*SearchesCollection, *APIResponse, error)
*
- List your saved searches.
- List your saved searches. *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @param authorization `Oauth Access Token` OAuth access token (RFC 6749). Must contain the access token type `Bearer` followed by an OAuth access token. #### Example: Bearer KKwmfHwxsEoeMDTMAfxOpO...
- @return *SearchesCollection
type SearchesCollection ¶
type SearchesCollection struct {
Searches []Search `json:"searches,omitempty"`
}
List your saved searches.
type Swagger_docApi ¶
type Swagger_docApi struct {
Configuration *Configuration
}
func NewSwagger_docApi ¶
func NewSwagger_docApi() *Swagger_docApi
func NewSwagger_docApiWithBasePath ¶
func NewSwagger_docApiWithBasePath(basePath string) *Swagger_docApi
func (Swagger_docApi) GetCompleteSwaggerSpec ¶
func (a Swagger_docApi) GetCompleteSwaggerSpec(userKey string) (*APIResponse, error)
*
- Meltwater API Swagger Spec
- Get the complete Swagger Spec that describes all Meltwater API endpoints. *
- @param userKey The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
- @return void