You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-22 10:05:29 +02:00
Дополнение доков по B24
This commit is contained in:
@@ -6,6 +6,11 @@ sidebar_position: 1
|
||||
Forms a link for authorization via the browser
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
*Function GetAuthorizationLink(Parameters = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
@@ -15,13 +20,14 @@ sidebar_position: 1
|
||||
|
||||
Returns: String - URL for browser transition
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Response = OPI_Twitter.GetAuthorizationLink(Parameters);
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
@@ -29,9 +35,6 @@ sidebar_position: 1
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
"https://twitter.com/i/oauth2/authorize?response_type=code&client_id=ZG1vSmxlVTJXYi05M2c0ek9iV246MTpjaQ&redirect_uri=https%3A%2F%2Fapi.athenaeum.digital%2Fopi%2Fhs%2Ftwitter&scope=tweet.read%20tweet.write%20tweet.moderate.write%20users.read%20follows.read%20follows.write%20offline.access%20space.read%20mute.read%20mute.write%20like.read%20like.write%20list.read%20list.write%20block.read%20block.write%20bookmark.read%20bookmark.write&state=state&code_challenge=challenge&code_challenge_method=plain"
|
||||
|
||||
"https://twitter.com/i/oauth2/authorize?response_type=code&client_id=ZG1vSmxlVTJXYi05M2c0ek9iV246MTpjaQ&redirect_uri=https%3A%2F%2Fapi.athenaeum.digital%2Fopi%2Fhs%2Ftwitter&scope=tweet.read%20tweet.write%20tweet.moderate.write%20users.read%20follows.read%20follows.write%20offline.access%20space.read%20mute.read%20mute.write%20like.read%20like.write%20list.read%20list.write%20block.read%20block.write%20bookmark.read%20bookmark.write&state=state&code_challenge=challenge&code_challenge_method=plain"
|
||||
```
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 2
|
||||
Gets the token by the code received when authorizing using the link from GetAuthorizationLink
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
*Function GetToken(Val Code, Val Parameters = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
@@ -16,14 +21,15 @@ sidebar_position: 2
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Response = OPI_Twitter.GetToken(Code, Parameters);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
@@ -31,15 +37,12 @@ sidebar_position: 2
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
{
|
||||
"refresh_token": "TmttM11111111111111111MY2dkNy1EZklLNmxIT1111111111111111xNTg2ODI6MTowOnJ0OjE",
|
||||
"access_token": "UTBtWXd11111111111111111111113TkRxWEdxdF9hVlQzOjE3MDUwNTMxNTg2ODE6MTowOmF0OjE",
|
||||
"scope": "mute.write tweet.moderate.write block.read follows.read offline.access list.write bookmark.read list.read tweet.write space.read block.write like.write like.read users.read tweet.read bookmark.write mute.read follows.write",
|
||||
"expires_in": 7200,
|
||||
"token_type": "bearer"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 3
|
||||
Updates the v2 token using the refresh_token
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
*Function RefreshToken(Val Parameters = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
@@ -15,8 +20,8 @@ sidebar_position: 3
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Response = OPI_Twitter.RefreshToken(Parameters);
|
||||
Constants.TwitterToken.Set(Response["access_token"]);
|
||||
@@ -24,8 +29,9 @@ sidebar_position: 3
|
||||
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
@@ -33,15 +39,12 @@ sidebar_position: 3
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
{
|
||||
"refresh_token": "TmttM11111111111111111MY2dkNy1EZklLNmxIT1111111111111111xNTg2ODI6MTowOnJ0OjE",
|
||||
"access_token": "UTBtWXd11111111111111111111113TkRxWEdxdF9hVlQzOjE3MDUwNTMxNTg2ODE6MTowOmF0OjE",
|
||||
"scope": "mute.write tweet.moderate.write block.read follows.read offline.access list.write bookmark.read list.read tweet.write space.read block.write like.write like.read users.read tweet.read bookmark.write mute.read follows.write",
|
||||
"expires_in": 7200,
|
||||
"token_type": "bearer"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 3
|
||||
Creates a tweet with a gif attachment
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
*Function CreateGifTweet(Val Text, Val GifsArray, Val Parameters = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
@@ -17,8 +22,8 @@ sidebar_position: 3
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
ImageArray = New Array;
|
||||
ImageArray.Add("C:\1.gif");
|
||||
@@ -27,8 +32,9 @@ sidebar_position: 3
|
||||
Response = OPI_Twitter.CreateGifTweet("Gifs", ImageArray, Parameters);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
@@ -36,10 +42,8 @@ sidebar_position: 3
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
{
|
||||
"data": {
|
||||
"text": "Nature https://t.co/VWkWU11111",
|
||||
"id": "1746086669499924991",
|
||||
@@ -48,5 +52,4 @@ sidebar_position: 3
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 2
|
||||
Creates a tweet with an image attachment
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
*Function CreateImageTweet(Val Text, Val ImageArray, Val Parameters = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
@@ -17,8 +22,8 @@ sidebar_position: 2
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
ImageArray = New Array;
|
||||
ImageArray.Add("C:\logo.png");
|
||||
@@ -27,8 +32,9 @@ sidebar_position: 2
|
||||
Response = OPI_Twitter.CreateImageTweet("Alpaca", ImageArray, Parameters);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
@@ -36,10 +42,8 @@ sidebar_position: 2
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
{
|
||||
"data": {
|
||||
"text": "Alpaca https://t.co/OodoWT1AAA",
|
||||
"id": "1745753004542726629",
|
||||
@@ -48,5 +52,4 @@ sidebar_position: 2
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 5
|
||||
Creates a tweet with a poll
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
*Function CreatePollTweet(Val Text, Val OptionArray, Val Duration, Val Parameters = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
@@ -18,8 +23,8 @@ sidebar_position: 5
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
OptionArray = New Array;
|
||||
OptionArray.Add("Good");
|
||||
@@ -29,8 +34,9 @@ sidebar_position: 5
|
||||
Response = OPI_Twitter.CreatePollTweet("How are you?", OptionArray, 60, Parameters);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
@@ -38,10 +44,8 @@ sidebar_position: 5
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
{
|
||||
"data": {
|
||||
"text": "How are you?",
|
||||
"id": "1746082302268969388",
|
||||
@@ -50,5 +54,4 @@ sidebar_position: 5
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 1
|
||||
Creates a tweet without attachments
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
*Function CreateTextTweet(Val Text, Val Parameters = "") ExportReturn CreateCustomTweet(Text,,,, Parameters);EndFunction*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
@@ -16,14 +21,15 @@ sidebar_position: 1
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Response = OPI_Twitter.CreateTextTweet("Regular text tweet", Parameters);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
@@ -31,10 +37,8 @@ sidebar_position: 1
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
{
|
||||
"data": {
|
||||
"text": "Regular text tweet",
|
||||
"id": "1745752006310895822",
|
||||
@@ -43,5 +47,4 @@ sidebar_position: 1
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 4
|
||||
Creates a tweet with a video attachment
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
*Function CreateVideoTweet(Val Text, Val VideosArray, Val Parameters = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
@@ -17,8 +22,8 @@ sidebar_position: 4
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
ImageArray = New Array;
|
||||
ImageArray.Add("C:\1.mp4");
|
||||
@@ -27,8 +32,9 @@ sidebar_position: 4
|
||||
Response = OPI_Twitter.CreateVideoTweet("Nature", ImageArray, Parameters);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
@@ -36,10 +42,8 @@ sidebar_position: 4
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
{
|
||||
"data": {
|
||||
"text": "Alpaca https://t.co/OodoWT1AAA",
|
||||
"id": "1745753004542726629",
|
||||
@@ -48,5 +52,4 @@ sidebar_position: 4
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user