Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++Delphiデータベース

Enterprise Connectorsで接続しよう!―SurveyMonkey

この記事はJim McKeethによる#ConnectTheDatayMonkey Enterprise Connector #ConnectTheDataの抄訳です。

 5月の「Enterprise Connector Spotlight」の一環として、SurveyMonkey Enterprise Connectorで何ができるかをご説明します。私たちはSurveyMonkeyを、私たちエンバカデロの社内外のアンケートで使用しています。SurveyMonkeyは無料で始められるオプションと、有料オプションを備えた、最も人気のあるアンケートプラットフォームの一つです。あなたが現在使っていなかったとしても、おそらくSurveyMonkeyのプラットフォームでアンケートに参加したことがあると思います。SurveyMonkeyの詳細は、ウェブサイトでさらに知ることができます。

それではSurveyMonkey Enterprise Connectorを使って実現できることをご紹介しましょう。Enterprise ConnectorsではSurveyMonkeyのライブデータをSQLで操作する方法を提供し、標準的な方法で容易に取り扱えます。これは、FireDACのすべての機能を使用して、独自のカスタムアプリから簡単にSurveyMonkeyのライブデータにアクセスできることを意味します。
SurveyMonkeyの利用を開始するために、CDataのWebサイトからトライアル版または製品版をダウンロードし、ガイドに従って接続してください。またSurveyMonkey Developer Portalよりclient IDとSecret APIキーを取得します。callback URLとScopeも必ず設定してください。その後、FireDAC の TFDConnection で SurveyMonkey に接続するための設定を行います。

https://community.idera.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-03-37/5621.pastedimage1557362172535v1.png

SurveyMonkey Developer Portalでアプリを設定します。

https://community.idera.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-03-37/4300.Capture-2019_2D00_05_2D00_08_5F00_04_2D00_18_2D00_30_5F00_PM.png
OAuthリダイレクトURLを必ず指定してください

https://community.idera.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-03-37/2072.pastedimage1557362498621v3.png
必要なScopeを設定してください。デフォルトでは下記の項目が必要です。
View Users, View Surveys, View Responses, View Response Details, View Contacts, and View Collectors.

https://community.idera.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-03-37/5224.SurveyMonkey-ConnectionSettings.png
CallbackURL、InitiateOAuth、OAuthClientId、OAuthClientSecretを設定します。また、必要に応じて RTK(Run-Time Key)やその他のパラメータも設定します

CDataのWebサイトにある資料をご覧ください。データモデルの項目には、Enterprise Connectorで利用できるビューの一覧があります。認証に使用されるストアドプロシージャの情報もあります。

SurveyMonkey コネクタ(2019版)で利用可能なビュー

名称 内容
CollectorMessages Shows information regarding messages sent from a collector.
CollectorRecipients Shows information regarding recipients of all or specific messages sent from a collector.
Collectors Shows collector information.
CollectorStats Shows statistics regarding all or specific messages sent from a collector.
ContactLists Shows contact list information.
Contacts Shows contact information.
Pages Shows information regarding pages for a survey.
RollupQuestions Shows rolled up individual stats information for a survey.
Rollups Shows rolled up stats information for a survey.
SurveyQuestions Shows the available columns for Survey Questions. Append _Questions to your survey name to query survey questions.
SurveyResponses Shows the available columns for Survey Responses. Append _Responses to your survey name to query survey responses.

それぞれのビューでどのようなデータが利用できるかを知ることができます。SurveyQuestionsとSurveyResponsesは直接のビューとしては存在していないことに注意してください。代わりに、調査名を明示してこれらのテーブルを参照します。

例:

すべての調査とそれぞれの表のリストは次のようなコードで取得できます。

後はC++BuilderまたはDelphiアプリケーションでSurveyMonkeyデータにアクセスするだけです。有効なアップデートサブスクリプション期間中のお客様は無料のWebセミナーにご登録いただくと Enterprise Connectors Survey Monkey Componentの無料のライセンスキーを取得できます。


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

IN THE ARTICLES