-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2051] Support instagram as a source
- Loading branch information
Christoph Pröschel
committed
Jun 30, 2021
1 parent
eda9c63
commit 9d93f13
Showing
13 changed files
with
398 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...r/src/main/java/co/airy/core/sources/facebook/payload/ConnectInstagramRequestPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package co.airy.core.sources.facebook.payload; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class ConnectInstagramRequestPayload { | ||
@NotNull | ||
private String pageId; | ||
@NotNull | ||
private String accountId; | ||
@NotNull | ||
private String pageToken; | ||
private String name; | ||
private String imageUrl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Connects an Instagram account to Airy Core. | ||
|
||
``` | ||
POST /channels.instagram.connect | ||
``` | ||
|
||
- `page_id` is ID of the Facebook page connected to the Instagram account | ||
- `page_token` is the Access Token of the Facebook page | ||
- `account_id` is the ID of the Instagram account | ||
- `name` is the custom name for the connected page | ||
- `image_url` (optional) is the custom image URL | ||
|
||
**Sample request** | ||
|
||
```json5 | ||
{ | ||
"page_id": "fb-page-id-1", | ||
"account_id": "ig-account-id", | ||
"page_token": "authentication token", | ||
"name": "My custom name for this account", | ||
"image_url": "https://example.org/custom-image.jpg" // optional | ||
} | ||
``` | ||
|
||
**Sample response** | ||
|
||
```json5 | ||
{ | ||
"id": "channel-uuid-1", | ||
"source": "instagram", | ||
"source_channel_id": "ig-account-id", | ||
"metadata": { | ||
"name": "My custom name for this account", | ||
// optional | ||
"image_url": "https://example.org/custom-image.jpg" | ||
} | ||
} | ||
``` |
Oops, something went wrong.