ritekit
Module ritekit
API
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_ritekit_1.5.1.png)
ballerinax/ritekit Ballerina library
Overview
This is a generated connector for RiteKit API v1.0 OpenAPI specification.
The RiteKit API provides the capability to perform social media marketing through hashtag suggestions, auto hashtagging, emoji suggestions, etc.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a RiteKit account.
- Obtain tokens - Follow this guide.
Quickstart
To use the RiteKit connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
First, import the ballerinax/ritekit module into the Ballerina project.
import ballerinax/ritekit;
Step 2: Create a new connector instance
You can now make the connection configuration using the RiteKit API keys config.
ritekit:ApiKeysConfig & readonly apiKeyConfig = ?; ritekit:Client ritekitClient = check new (clientConfig);
Step 3: Invoke connector operation
Following is code demonstrates how to get a project using ballerinax/ritekit
connector.
public function main() returns error? { json response = check ritekitClient->trendingHashtags(); }
Clients![](/images/permalink.svg)
ritekit: Client![](/images/permalink.svg)
This is a generated connector for RitKit API v1.0 OpenAPI specification.
The RiteKit API provides the capability to perform social media marketing through hashtag suggestions, auto hashtagging, emoji suggestions, etc.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a RitKit account 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.ritekit.com" - URL of the target service
autoEmojify![](/images/permalink.svg)
Auto-Emojify
Parameters
- text string - Text of the post
Return Type
- json|error - OK
emojiSuggestions![](/images/permalink.svg)
Emoji Suggestions
Parameters
- text string - Text of the post
Return Type
- json|error - OK
animateImage![](/images/permalink.svg)
Animate Image
Return Type
- json|error - OK
companyLogo![](/images/permalink.svg)
Company Logo
Parameters
- domain string - URL of the company
textToImage![](/images/permalink.svg)
function textToImage(string quote, string author, int fontSize, string quoteFont, string quoteFontColor, string authorFont, string authorFontColor, int enableHighlight, string highlightColor, string bgType, string backgroundColor, string gradientType, string gradientColor1, string gradientColor2, string brandLogo, string animation, int? showQuoteMark) returns json|error
Text to Image
Parameters
- quote string - Text of the quote
- author string - Name of the author/source
- fontSize int - Font size for the quote (author font size is calculated automatically)
- quoteFont string - Font-family used for quote text
- quoteFontColor string - Font color of the quote text
- authorFont string - Font-family used for author name
- authorFontColor string - Font color of the author
- enableHighlight int - Enable highlight on quote text
- highlightColor string - Color used for highlight
- bgType string - Background type (gradient/solid)
- backgroundColor string - Background color for solid background type
- gradientType string - Type of gradient background (linear/radial)
- gradientColor1 string - First color for gradient background type
- gradientColor2 string - Second color for gradient background type
- brandLogo string - URL of the brand logo
- animation string - Animation type: none, rays, glint, circle
- showQuoteMark int? (default ()) - showing/hiding quote mark
Return Type
- json|error - OK
listOfCtas![](/images/permalink.svg)
function listOfCtas() returns json|error
List of CTAs
Return Type
- json|error - OK
shortenLink![](/images/permalink.svg)
Shorten Link
Return Type
- json|error - OK
trendingHashtags![](/images/permalink.svg)
Trending Hashtags
Parameters
- green string (default "1") - Restrict results only to green hashtags. Hides overused (red) hashtags.
- latin string (default "1") - Restrict results only to hashtags with latin characters
Return Type
- json|error - OK
autoHashtag![](/images/permalink.svg)
Auto-Hashtag
Parameters
- post string - Text of the post
- maxHashtags int (default 2) - Max number of hashtags.
- hashtagPosition string (default "auto") - Position of hashtags: end => at the end, auto => anywhere
Return Type
- json|error - OK
hashtagSuggestions![](/images/permalink.svg)
Hashtag Suggestions
Parameters
- text string - Topic
Return Type
- json|error - OK
hashtagHistory![](/images/permalink.svg)
Hashtag History
Parameters
- hashtag string - Hashtag without # mark
Return Type
- json|error - OK
hashtagStats![](/images/permalink.svg)
Hashtag Stats
Parameters
- tags string - Hashtag(s) without # mark
Return Type
- json|error - OK
hashtagsCleaner![](/images/permalink.svg)
Hashtags cleaner
Parameters
- post string - post
Return Type
- json|error - OK
Records![](/images/permalink.svg)
ritekit: ApiKeysConfig![](/images/permalink.svg)
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- clientId string - Represents API Key
client_id
ritekit: ClientHttp1Settings![](/images/permalink.svg)
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
ritekit: ConnectionConfig![](/images/permalink.svg)
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-forwarded
header
- 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
ritekit: ProxyConfig![](/images/permalink.svg)
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
Anydata types![](/images/permalink.svg)
ritekit: Emojis![](/images/permalink.svg)
Emojis
ritekit: Hashtags![](/images/permalink.svg)
Hashtags
ritekit: Images![](/images/permalink.svg)
Images
ritekit: Instagram![](/images/permalink.svg)
ritekit: LinkShortening![](/images/permalink.svg)
LinkShortening
Import
import ballerinax/ritekit;
Metadata
Released date: over 1 year ago
Version: 1.5.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Marketing/Social Media Marketing
Cost/Freemium
Contributors
Dependencies