You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide9/modeling/integration/odata-services/wrap-services-odata.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,27 +149,27 @@ The following examples are possible ways to use OData to connect to external dat
149
149
150
150
You can use the features released in Studio Pro [9.17](/releasenotes/studio-pro/9.17/) to build a connector that wraps a third-party service API as OData.
151
151
152
-
For example, say you want to build an app that works with the [Twitter v2 REST API](https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api). You would like a simple app where you can enter the ID of a Twitter user and view their latest tweets and followers.
152
+
For example, say you want to build an app that works with the [X v2 REST API](https://developer.x.com/en/docs/x-api/getting-started/about-x-api). You would like a simple app where you can enter the ID of an X user and view their latest tweets and followers.
153
153
154
154
{{% alert color="info" %}}
155
-
This guide is meant to serve as an example to show how to use *Connector Kit 2* features, and is not an official guide to building a Twitter connector. It is intended for local deployments and has not been tested.{{% /alert %}}
155
+
This guide is meant to serve as an example to show how to use *Connector Kit 2* features, and is not an official guide to building an X connector. It is intended for local deployments and has not been tested.{{% /alert %}}
156
156
157
157
{{% alert color="warning" %}}
158
-
On February 9, 2023, Twitter will drop support for free API access and will offer a paid basic version instead. Please use the guide below as a reference only.
158
+
On February 9, 2023, X will drop support for free API access and will offer a paid basic version instead. Please use the guide below as a reference only.
159
159
{{% /alert %}}
160
160
161
161
#### Prerequisites
162
162
163
163
To build your app, you first need to do the following:
164
164
165
-
*[Register as a Twitter Developer](https://developer.twitter.com/en/portal)
165
+
*[Register as an X Developer](https://developer.x.com/en/portal)
166
166
* Download Studio Pro [9.17](/releasenotes/studio-pro/9.17/) or above
167
167
168
168
#### Building the Connector {#twitter-connector}
169
169
170
-
Set up a connector module that communicates to the Twitter API with OData by following the steps outlined below. To ensure that your app will run, fill in your valid bearer token as the **Default value** in a **BearerToken**[constant](/refguide9/constants/). You can get one by [registering as a Twitter Developer](https://developer.twitter.com/en/portal).
170
+
Set up a connector module that communicates to the X API with OData by following the steps outlined below. To ensure that your app will run, fill in your valid bearer token as the **Default value** in a **BearerToken**[constant](/refguide9/constants/). You can get one by [registering as an X Developer](https://developer.x.com/en/portal).
171
171
172
-
1. Use the Twitter API to find the JSON structures for the calls for users, tweets, and followers, and add the [JSON structure](/refguide9/json-structures/) for each.
172
+
1. Use the X API to find the JSON structures for the calls for users, tweets, and followers, and add the [JSON structure](/refguide9/json-structures/) for each.
173
173
2. Create [import mappings](/refguide9/mapping-documents/#import-mappings) for each, which generates entities in your domain model.
174
174
{{< figure src="/attachments/refguide9/modeling/integration/wrap-services-odata/twitter-connector-domain-model.png" alt="Domain model for Twitter connector module." class="no-border" >}}
175
175
3. Publish all three non-persistable entities as a published OData service (see [Non-Persistable Entities as Published OData Resources](#npe-published-odata)).
@@ -182,35 +182,35 @@ Set up a connector module that communicates to the Twitter API with OData by fol
182
182
183
183
#### Building the Client
184
184
185
-
Set up a Twitter client module that allows users to input a Twitter ID and communicates to the Twitter API via your [Twitter connector](#twitter-connector).
185
+
Set up an X client module that allows users to input an X ID and communicates to the X API via your [X connector](#x-connector).
186
186
187
187
1. Create a consumed OData service in the client module, and import the XML file you exported in the [building the connector](#twitter-connector) section.
188
188
2. Drag the external **Users**, **Tweets**, and **Followers** entities into your client domain model.
189
-
3. Add a non-persistable entity for the TwitterClientInput to be able to fill in the data, handled by a **NewTwitterInput** microflow.
189
+
3. Add a non-persistable entity for the XClientInput to be able to fill in the data, handled by a **NewXInput** microflow.
190
190
191
-
Double-click the entity, and in the **Persistable** field, choose **No**. The domain model for the Twitter client looks like this:
191
+
Double-click the entity, and in the **Persistable** field, choose **No**. The domain model for the X client looks like this:
192
192
193
-
{{< figure src="/attachments/refguide9/modeling/integration/wrap-services-odata/twitter-client-domain-model.png" alt="Twitter client domain model with external entities and non-persistable entity." class="no-border" >}}
193
+
{{< figure src="/attachments/refguide9/modeling/integration/wrap-services-odata/twitter-client-domain-model.png" alt="X client domain model with external entities and non-persistable entity." class="no-border" >}}
194
194
195
195
{{< figure src="/attachments/refguide9/modeling/integration/wrap-services-odata/newtwitterinput-microflow.png" alt="Microflow that handles inputted usernames." class="no-border" >}}
196
196
197
197
4. Add a new page to display the data, and create a ShowUserPage microflow.
198
198
199
-
The microflow includes a **Retrieve Object** action that pulls information from the **TwitterClientInput** non-persistable entity. In this case, you can use the XPath constraint [Username=$TwitterClientInput/Username] to get the users with the username you entered. This is then translated into an OData request that is sent to the connector.
199
+
The microflow includes a **Retrieve Object** action that pulls information from the **XClientInput** non-persistable entity. In this case, you can use the XPath constraint [Username=$XClientInput/Username] to get the users with the username you entered. This is then translated into an OData request that is sent to the connector.
200
200
201
201
{{< figure src="/attachments/refguide9/modeling/integration/wrap-services-odata/showuserpage-microflow.png" alt="Microflow that handles TwitterClientInput request and shows a page." class="no-border" >}}
202
202
203
-
5. On the **TwitterPage**, use a **Data Grid**, and pull data **by Association** from the to get the tweets and followers connected to the user.
203
+
5. On the **XPage**, use a **Data Grid**, and pull data **by Association** from the to get the tweets and followers connected to the user.
204
204
205
205
#### Parsing the URI
206
206
207
-
Run the Twitter client to receive decoded OData requests.
207
+
Run the X client to receive decoded OData requests.
208
208
209
209
1. Manually parse the URI, and create a microflow to read data from the URI.
2. Extract the Twitter user ID from the query, and use a **Call REST** object to ping the Twitter API for the followers (or other data). The API response goes into the import mapping.
211
+
2. Extract the X user ID from the query, and use a **Call REST** object to ping the X API for the followers (or other data). The API response goes into the import mapping.
212
212
213
-
Ensure that you have created microflows for all entities used in your connector. When you run your app, you can enter the ID of a Twitter user and view their latest tweets and followers.
213
+
Ensure that you have created microflows for all entities used in your connector. When you run your app, you can enter the ID of an X user and view their latest tweets and followers.
214
214
215
215
## Updatable Operational Data Stores {#operational-data-stores}
0 commit comments