============== Venue ============== .. _venues-venues: ------------------------- Venue情報を得る ------------------------- http://developer.foursquare.com/docs/venues/venues.html `https://api.foursquare.com/v2/venues/VENUE_ID` .. Gives details about a venue, including location, mayorship, tags, tips, specials, and category. venueの詳細情報を得ます。これには位置情報、mayorship、tag、tips、 specials、カテゴリーを含みます。 .. Authenticated users will also receive information about who is here now. 認証済みユーザであれば、今そこに誰がいるかの情報も得ることが出来ます。 .. If the venue ID given is one that has been merged into another "master" venue, the response will show data about the "master" instead of giving you an error. もし、与えられたvenue IDが他の "master" venueと合併したものであった場合、 レスポンスにはエラーの代わりに "master"の情報が記載されます。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - :ref:`NO` ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - VENUE_ID - A9ABCD - **必須** 取得したいVenue ID ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - venue - :ref:`responses-venue` `試す: `_ .. _venues-add: ------------------------- Venueの追加 ------------------------- http://developer.foursquare.com/docs/venues/add.html `https://api.foursquare.com/v2/venues/add` .. Allows users to add a new venue. ユーザにvenueを追加させます。 .. If this method returns an error, give the user the option to edit her inputs. In addition to this, give users the ability to say "never mind, check-in here anyway" and perform a manual ("venueless") checkin by specifying just the venue name. This is rare, but there's a chance you'll see this case if the user wants to force a duplicate venue. もしこのメソッドがエラーを返した場合、ユーザは再度編集しても構いません。 さらに、venueの名前だけを指定した"venueなし(venuless)"のcheck-inを行う、 "気にしないでとにかくcheck-inする(never mind, check-in here anyway)"と 表示しても構いません。また、めったにないことですが、ユーザが重複した venueを作ることもあります。 .. All fields are optional, but one of either a valid address or a geolat/geolong pair must be provided. We recommend that developers provide a geolat/geolong pair in every case. 全てのフィールドはオプションですが、正しい住所か緯度・経度のペアのどち らかは必須です。私たちは開発者にどの場合でも緯度経度を提供するように勧めます。 .. Caller may also, optionally, pass in a category (primarycategoryid) to which you want this venue assigned. You can browse a full list of categories using the /categories method. On adding venue, we recommend that applications show the user this hierarchy and allow them to choose something suitable. また、オプションでそのvenueに設定したいカテゴリー(`primarycategoryid`) を渡すことも出来ます。 :ref:`/categories` メソッドを 使うことで、カテゴリーの完全なリストを得ることが出来ます。Venueを追加す るときは、アプリケーションがカテゴリーの階層構造を表示し、ユーザが適切 なカテゴリーを選択できるようにしてください。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - name - Habana Outpost - **必須** venueの名前 * - address - 1313 Mockingbird Lane - 住所 * - crossStreet - at Fulton St - 一つ以上のもっとも近い通り名 * - city - New York - 都市名 * - state - new York - 州、省、県 * - zip - AE1234 - zipあるいは郵便番号 * - phone - 00 01 23 1234 - 電話番号 * - ll - 44.3,37.2 - 出来る限り正確な緯度経度 * - primaryCategoryId - 4bf58dd8d48988d1d4941735 - 設定したいカテゴリーのID ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - venue - 今作成した :ref:`Venue` .. _venues-categories: ------------------------- カテゴリー ------------------------- http://developer.foursquare.com/docs/venues/categories.html `https://api.foursquare.com/v2/venues/categories` .. Returns a hierarchical list of categories applied to venues. Note that top-level categories do not have IDs because they cannot be assigned to a venue. venueに付けられる、カテゴリーの階層構造のリストを返します。トップレベル のカテゴリーはvenueに割り当てられないためにIDを持たないことに注意してく ださい。 .. When designing client applications, please download this list only once per session, but also avoid caching this data for longer than a week to avoid stale information. クライアントアプリケーションを設計するときに、セッションごとに一回だけ このカテゴリーのリストをダウンロードするようにしてください。また、古い 情報を扱うことを避けるために、1週間以上キャッシュしないようにしてくださ い。 .. Category images that come down through the API are available in three sizes: カテゴリーの画像は三種類のサイズがAPIから取得できます。 - 32 x 32 pixels (標準) - 64 x 64 pixels (iPhone4 Retina ディスプレイやもっと高精度なデバイスにぴったりです) - 256 x 256 pixels .. By default, the API methods return the 32px image in this format: 標準では、APIメソッドはこのフォーマットで32pxの画像を返します。 http://foursquare.com/img/categories/food/coffeeshop.png .. To get a different size, simply specify a different suffix: 異なるサイズの画像が欲しい場合は、単に違う語を後ろに付けてください。 - http://foursquare.com/img/categories/food/coffeeshop_64.png - http://foursquare.com/img/categories/food/coffeeshop_256.png .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - NO ~~~~~~~~~~ パラメータ ~~~~~~~~~~ なし ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - categories - 子と孫を含むカテゴリーのリスト。それぞれのトップレベルのカテゴリー は `name` 、 `icon` 、 `categories` (子のカテゴリの配列)を含みま す。子のカテゴリーはvenueに追加するときに使う `id` も含みます。 `試す: `_ .. _venues-search: ------------------------- Venue検索 ------------------------- http://developer.foursquare.com/docs/venues/search.html `https://api.foursquare.com/v2/venues/search` .. Returns a list of venues near the current location, optionally matching the search term. 現在の場所に近いvenueのリストを返します。また、検索語が与えてマッチする ものだけを返すことも出来ます。 .. If lat and long is provided, each venue includes a distance. If authenticated, the method will return venue metadata related to you and your friends. If you do not authenticate, you will not get this data. もし緯度経度が与えられた場合、それぞれのvenueは距離を含みます。もし認証 済みであれば、このメソッドはユーザとユーザのfriendに関連するvenueのメタ データを返します。もし認証されていない場合は、これらの情報は得られませ ん。 .. Note that most of the fields returned inside venue can be optional. The user may create a venue that has no address, city or state (the venue is created instead at the geolat/geolong specified). Your client should handle these conditions safely. レスポンスのvenueの中に含まれているフィールドのほとんどはオプションであ ることに注意してください。ユーザは住所、都市名がないvenueを作ることもあ ります(venueは代わりに緯度経度で作られています)。あなたのクライアントは このような状態を安全に扱える必要があります。 .. You'll also notice a stats block that reveals some count data about the venue. herenow shows the number of people currently there (this value can be 0). また、 stats 部分でvenueに関するいくつかの数値情報が含まれることに注意 してください。 `herenow` は現在そこにいる人の数です(この値は0の場合があ ります)。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - :ref:`NO` ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - ll - 44.3,37.2 - ユーザの場所の緯度経度。レスポンスには距離も含まれる場合があります * - llAcc - 10000.0 - ユーザの緯度経度情報の精度をメートルで示したもの * - alt - 0 - ユーザの高度をメートルで示したもの * - altAcc - 10000.0 - ユーザの高度情報の精度をメートルで示したもの * - query - donuts - タイトルを検索する検索語 * - limit - 100 - **オプション** レスポンスの数。最大500 * - intent - checkin - **オプション** この検索を行う目的を示します。もし、ユーザが近くの venueにcheck inを行いたいのであれば、 `checkin` (デフォルト)とし てください。結果は私たちがユーザがcheckinをしたいと思われる順番に ソートされます。もし、与えれたvenue名と場所に合うようなvenueを見 つけたいのであれば(例: 3rdパーティのvenueとfoursquareのvenueとを マッチングさせるためなど)、 `match` を与えてください。結果はベス トマッチが最初に、続いて距離やスペルミスやバリエーションがあるも のが続きます ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - venues - venueのグループが複数含まれているオブジェクトの配列です。それぞれ のgroupは `favorites` 、 `trending` 、 あるいは `nearby` (人間が 読める形式の近くの名前、"Nearyby favorites"など) といった `type` を持ちます。また、 :ref:`responses-venue` の配列の `item` を持ち ます。私たちはクライアントに対して、グループのタイプが増えたり減っ たり、trendingに不明瞭なオブジェクトのグループが表示されたり、新 しい結果を捨てるガラクタ入れの中のよく分からないグループがあった りても問題ないようにして欲しいと考えています。例えば、選挙の日に はfoursquareは一時的に投票所グループを作るかもしれませんが、あな たのアプリケーションはそれをちゃんと丁寧に扱えなくてはなりません。 `試す: `_ .. _venues-herenow: ------------------------- 今誰がいるのか (HereNow) ------------------------- http://developer.foursquare.com/docs/venues/herenow.html `https://api.foursquare.com/v2/venues/VENUE_ID/herenow` .. Provides a count of how many people are at a given venue, plus the first page of the users there, friends-first, and if the current user is authenticated. 今現在、与えられたvenueに何人の人がいるかを返します。さらに、そのユーザ の最初のページ、frinedのfirstページ、現在のユーザが認証されているかを返 します。(訳註: 自信なし) .. This is an experimental API. We're excited about the innovation we think it enables as a much more efficient version of fetching all data about a venue, but we're also still learning if this right approach. Please give it a shot and provide feedback on the mailing list. これは *実験的* なAPIです。私たちは技術的革新によってユーザの全ての checkinを効率的に返せるようになったことに興奮していますが、まだ、これが 正しい方法なのかどうかを検証中です。メーリングリストで意見とフィードバッ クをお待ちしています。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - NO ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - VENUE_ID - A9ABCD - **必須** 取得したいvenueのID ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - hereNow - :ref:`responses-checkin` の `item` とその数である `count` `試す: `_ .. _venues-tips: ------------------------- venueのtips ------------------------- http://developer.foursquare.com/docs/venues/tips.html `https://api.foursquare.com/v2/venues/VENUE_ID/tips` venueのtipsを返します。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - NO ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - VENUE_ID - XXX123YYYY - **必須** tipsを付け加えたいvenueの場所 (訳註: こぴぺしてしまった?) * - sort - recent - `recent` あるいは `popular` のどちらか ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - tips - :ref:`responses-tips` の `item` とその数である `count` `試す: `_ .. _venues-marktodo: ------------------------- TODOと印をつける ------------------------- http://developer.foursquare.com/docs/venues/marktodo.html `https://api.foursquare.com/v2/venues/VENUE_ID/marktodo` venueをtodoとして印をつけることが出来ます。オプションとして、文字列を追 加することも出来ます。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - VENUE_ID - XXX123YYYY - **必須** TODOとして印をつけたいvenueのID * - text - The donuts are tasty! - このtipsの文字列 ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - todo - 新しく追加された :ref:`responses-todo` 。これには暗黙のうちに作られたtipsも含まれます .. _venues-flag: ------------------------- フラグを付ける ------------------------- http://developer.foursquare.com/docs/venues/flag.html `https://api.foursquare.com/v2/venues/VENUE_ID/flag` .. Allows users to indicate a venue is incorrect in some way. ユーザがvenueのなにかが間違っているという印をつけます。 .. Flags are pushed into a moderation queue. If a closed flag is approved, the venue will no longer show up in search results. Moderators will attempt to correct cases of mislocated or duplicate venues as appropriate. If the user has the correct address for a mislocated venue, use proposeedit instead. フラグはモデレートの列に入れられます。もし、 `closed` フラグが承認され た場合、そのvenueは検索結果に現れることはなくなります。`mislocated` か venueの `duplicate` の場合、モデレータは修正を試みます。もし、ユーザが 住所が違う(mislocated)venueの正しい住所を持っている場合、 :ref:`venues-proposeedit` を代わりに使ってください。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - VENUE_ID - AVNU234 - **必須** 変更が提案されているvenueのID * - problem - mislocated - **必須** `mislocated` `closed` `duplicat` のどれか ~~~~~~~~~~ レスポンス ~~~~~~~~~~ なし .. _venues-proposeedit: ------------------------- 変更を提案する ------------------------- http://developer.foursquare.com/docs/venues/proposeedit.html `https://api.foursquare.com/v2/venues/VENUE_ID/proposeedit` .. Allows you to propose a change to a venue. venueの情報を変える提案をします。 .. If the user knows a correct address, use this method to save it. Otherwise, use flag to flag the venue instead (you need not specify a new address or geolat/geolong in that case). もしユーザが正しい住所を知っていれば、このメソッドを使って保存してくだ さい。そうでなければ、代わりに :ref:`venues-flag` を使ってフラグをたて てください(この場合、新しい住所あるいは緯度経度を指定する必要はありません)。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - VENUE_ID - AVNU234 - **必須** 変更を提案したいvenueの識別子 * - name - Habana Outpost - venueの名前 * - address - 1313 Mockingbird Lane - 住所 * - crossStreet - at Fulton St - 一つ以上のもっとも近い通り名 * - city - New York - 都市名 * - state - new York - 州、省、県 * - zip - AE1234 - zipあるいは郵便番号 * - phone - 00 01 23 1234 - 電話番号 * - ll - 44.3,37.2 - 出来る限り正確な緯度経度 * - primaryCategoryId - 4bf58dd8d48988d1d4941735 - 設定したいカテゴリーのID ~~~~~~~~~~ レスポンス ~~~~~~~~~~ なし