-
Notifications
You must be signed in to change notification settings - Fork 34
RetrieveRecord
ngocnicholas edited this page Mar 30, 2017
·
1 revision
Retrieve a record with a specific ID from a specific table as an asynchronous operation.
Namespace: AirtableApiClient
Assembly: AirtableApiClient.dll
public async Task<AirtableRetrieveRecordResponse> RetrieveRecord(
string tableName,
string id)
Type: string
Name of the table of which the record to be retrieved from
Type: string
ID of the record to be retrieved.
The task object representing the asynchronous operation.
This operation will not block. The returned task object will complete once the entire response including content is read.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AirtableApiClient;
readonly string baseId = YOUR_BASE_ID;
readonly string appKey = YOUR_APP_KEY;
using (AirtableBase airtableBase = new AirtableBase(appKey, baseId))
{
Task<AirtableRetrieveRecordResponse> task = airtableBase.RetrieveRecord(YOR_TABLE_NAME, ID_OF_RECORD_TO_RETRIEVE);
var response = await task;
if (!response.Success)
{
string errorMessage = null;
if (response.AirtableApiError is AirtableApiException)
{
errorMessage = response.AirtableApiError.ErrorMessage;
}
else
{
errorMessage = "Unknown error";
}
// Report errorMessage
}
else
{
var record = response.Record;
// Do something with your retrieved record.
// Such as getting the attachmentList of the record if you
// know the Attachment field name
var attachmentList = response.Record.GetAttachmentField(YOUR_ATTACHMENT_FIELD_NAME);
}
}
- AirtableBase
- AirtableRecordList
-
AirtableRecordList
<T>
1. AirtableRecord<T>
- AirtableApiException
-
AirtableApiResponse
- AirtableListRecordsResponse
- AirtableListRecordsResponse
<T>
- AirtableRetrieveRecordResponse
- AirtableRetrieveRecordResponse
<T>
- AirtableCreateUpdateReplaceRecordResponse
- AirtableCreateUpdateReplaceMultipleRecordsResponse
- AirtableDeleteRecordResponse
- AirtableCreateUpdateCommentResponse
- AirtableListCommentsResponse
- AirtableDeleteCommentResponse
- AirtableListWebhooksResponse
- AirtableListPayloadsResponse
- AirtableCreateWebhookResponse
- AirtableDeleteWebhookResponse
- AirtabeEnableWebhookNotificationsResponse
- AirtabeRefreshWebhookResponse
- CommentList
- IdFields
- PerformUpsert
- UserIdAndScopes
- Webhooks
- PayloadList
- WebhooksNotification
[Airtable]: http://www.airtable.com