============== ユーザ ============== .. _users-user: ----- User ----- http://developer.foursquare.com/docs/users/users.html `https://api.foursquare.com/v2/users/USER_ID` .. Returns profile information for a given user, including selected badges and mayorships. 指定されたユーザのプロファイル情報を返す。これには選択されたbadgeや mayorshipも含まれます。 .. if the user is a friend, contact information, Facebook ID, and Twitter handle and the user's last checkin may also be present. もしそのユーザがfriendの場合、連絡先情報、Facebook ID、Twitterハンドル 名とそのユーザが最後にcheckinした場所が分かります。 .. In addition, the pings field will indicate whether checkins from this user will trigger a ping (notifications to mobile devices). This setting can be changed via setpings. Note that this setting is overriden if pings is false in settings (no pings will be sent, even if this user is set to true). さらに、 `pings` はこのユーザがcheckinするとping(携帯端末への通知)が送 られることを示しています。この設定は :ref:`setpings` で 変更できます。この設定は `pings` が :ref:`settings` で `false` にされている場合には上書きされることに注意してください(この ユーザがtrueにしている場合でも、pingは送信されません) .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - 詳細を知りたいユーザのID。現在ログインしているユーザを知りたい場合は `self` を渡す ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :stub-columns: 1 :widths: 10 90 * - user - :ref:`responses-user` `試す: `_ .. _users-search: ------------ ユーザ検索 ------------ http://developer.foursquare.com/docs/users/search.html `https://api.foursquare.com/v2/users/search` そのユーザのfriendの検索を行います。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GETかPOST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - phone - 91712344567,123450 - カンマ区切りの探したい電話番号 * - email - foo@bar.com,alice@baz.com - カンマ区切りの探したいメールアドレス * - twitter - dens,sesamestreet - カンマ区切りの探したいTwitterハンドル名 * - twitterSource - krave - 単一のTwitterハンドル名。結果はfoursquareを使っている *このユーザのfriend* * - fbid - 123,456 - カンマ区切りの探したいFacebook ID * - name - Fred Fredrickson - 単一の探したい人の名前 ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :stub-columns: 1 :widths: 10 90 * - users - :ref:`responses-user` の配列。TwitterかFacebookの情報とfriendの情報も含まれます `試す: `_ .. _users-requests: -------------------- 処理待ちのfriend要求 -------------------- http://developer.foursquare.com/docs/users/requests.html `https://api.foursquare.com/v2/users/requests` .. Shows a user the list of users with whom they have a pending friend request (i.e., someone tried to add the acting user as a friend, but the acting user has not accepted). そのユーザが持つ、処理待ちのfrined要求のリストを示します。(つまり、誰か がこのユーザをfrinedに加えようとしているが、このユーザが承認していない状態です) .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :stub-columns: 1 :widths: 10 90 * - user - :ref:`responses-user` の配列 `試す: `_ .. _users-badges: ------- Badge ------- http://developer.foursquare.com/docs/users/badges.html `https://api.foursquare.com/v2/users/USER_ID/badges` 与えられたユーザのBadge情報を返します。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - self - Badge情報を見たいユーザのID ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :stub-columns: 1 :widths: 10 90 * - sets - badge ID、unlockされたbadge、badgeのunlock IDの階層構造状の `groups` が表示されます。Badgeはグループを超えて何度も出てくる可 能性があります。例: unlockされたpartner badgeは"all badges"、 "partner badges"、"Bravo badges"の下に出てくると思われます。 * - badges - :ref:`Badge` に対するbadge IDかunlockされたbadge IDの連 想配列。UnlockされたBadgeはunlockした時のcheckin(クライアントが要 求したときのみ返される)や基本的なBadge IDを含んでいる場合がありま す。 `試す: `_ .. _users-checkins: ---------- Checkin ---------- http://developer.foursquare.com/docs/users/checkins.html `https://api.foursquare.com/v2/users/USER_ID/checkins` .. Returns a history of checkins for the authenticated user. 認証済みユーザのCheckin履歴を返します。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - self - 現在のところ"self"のみサポートしています * - limit - 100 - レスポンスのアイテム数。最大500 * - offset - 100 - ページを使用する場合に使います * - afterTimestamp - 1279044824 - 最初にレスポンスを受けたときから経過したエポックタイム (1970-01-01T00:00:00Z)からの秒数。これは次のページを探すときや、 変更をpollingするときに便利です。pollingの時に結果を失うことを避 けるために、最後にpollした時刻から何秒か引いておき、それから重複 分を削ることをお勧めします。 * - beforeTimestamp - 1279044824 - 最初にレスポンスを受けたとき以前のエポックタイムからの秒数。ペー ジを戻るときに便利です。 (訳注:first resultsじゃなくてlast resultsじゃないのかな) ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :stub-columns: 1 :widths: 10 90 * - checkins - :ref:`responses-checkins` とその数 `試す: `_ .. _users-friends: -------------------- friendの一覧を得る -------------------- http://developer.foursquare.com/docs/users/friends.html `https://api.foursquare.com/v2/users/USER_ID/friends` frinedの一覧を得ます。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - 詳細を知りたいユーザのID。現在ログインしているユーザを知りたい場合は `self` を渡す ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :stub-columns: 1 :widths: 10 90 * - frineds - :ref:`簡略版Userレスポンス` の `item` とその数を示す `count` `試す: `_ .. _users-tips: ------------------------- tips ------------------------- http://developer.foursquare.com/docs/users/tips.html `https://api.foursquare.com/v2/users/USER_ID/tips` ユーザのtipsを返す。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - 詳細を知りたいユーザのID。現在ログインしているユーザを知りたい場合は `self` を渡す * - sort - recent - `recent`, `nearby`, `popular` のどれか。nearbyの場合、geolatとgeolongが必要です * - ll - 33.7,44.2 - ユーザの緯度経度情報 ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :stub-columns: 1 :widths: 10 90 * - tips - :ref:`responses-tips` とその数 `試す: `_ .. _users-todos: ------------------------- TODO ------------------------- http://developer.foursquare.com/docs/users/todos.html `https://api.foursquare.com/v2/users/USER_ID/todos` TODOを返します。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - GET * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - 詳細を知りたいユーザのID。現在ログインしているユーザを知りたい場合は `self` を渡す * - sort - recent - `recent` , `popular` のどちらか。nearbyの場合、geolatとgeolongが必要です(訳註: nearbyはないけど、こぴぺ失敗?) * - ll - 33.7,44.2 - ユーザの緯度経度情報 ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :stub-columns: 1 :widths: 10 90 * - todos - :ref:`responses-todos` とその数 `試す: `_ .. _users-venuehistory: ------------------------- Venue履歴 ------------------------- http://developer.foursquare.com/docs/users/venuehistory.html `https://api.foursquare.com/v2/users/USER_ID/venuehistory` .. Returns a list of all venues visited by the specified user, along with how many visits and when they were last there. 指定されたユーザが訪れた全てのVenueのリストを返します。この中には、何回 訪れたか、最後に訪れたのはいつか、という情報も含まれます。 .. This is an experimental API. We're excited about the innovation we think it enables as a much more efficient version of fetching all of a user's checkins, 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 * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - self - 現在のところ"self"だけ対応しています ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - venues - `beenHere` の数、 `lastHereAt` のタイムスタンプ、 `venue` :ref:`venue` が含まれるオブジェクト `items` とその `count` `試す: `_ .. _users-request: ------------------------- friend申請を送る ------------------------- http://developer.foursquare.com/docs/users/request.html `https://api.foursquare.com/v2/users/USER_ID/request` friend申請を別のユーザに送ります。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - **必須** 申請を送りたいユーザのID ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - user - 処理待ち状態になった :ref:`responses-user` .. _users-unfriend: ------------------------- friend から外す ------------------------- http://developer.foursquare.com/docs/users/unfriend.html `https://api.foursquare.com/v2/users/USER_ID/unfriend` .. Cancels any relationship between the acting user and the specified user. 現在のユーザと指定されたユーザの間の全ての関係を取消します。 .. Removes a friend, unfollows a celebrity, or cancels a pending friend request. frinedから外し、celebrityのフォローを外し、処理待ちのfrined申請をキャン セルします。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - frinedから外したいユーザのID (訳注: 必須?) ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - user - :ref:`responses-user` .. _users-approve: ------------------------- friend申請を承認する ------------------------- http://developer.foursquare.com/docs/users/approve.html `https://api.foursquare.com/v2/users/USER_ID/approve` 他のユーザからの処理待ちfrined申請に対して、承認します。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - **必須** 承認する処理待ちのユーザのID ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - user - 承認した :ref:`responses-user` .. _users-deny: ------------------------- frined申請を拒否する ------------------------- http://developer.foursquare.com/docs/users/deny.html `https://api.foursquare.com/v2/users/USER_ID/deny` 他のユーザからの処理待ちfrined申請に対して、拒否します。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - **必須** 拒否するユーザのID ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - user - 拒否した :ref:`responses-user` .. _users-setpings: ------------------------- setpingsを設定する ------------------------- http://developer.foursquare.com/docs/users/setpings.html `https://api.foursquare.com/v2/users/USER_ID/setpings` .. Changes whether the acting user will receive pings (phone notifications) when the specified user checks in. 現在のユーザが指定したユーザがcheckinしたときに送られる ping (電話の通 知)を受け取るかどうかを設定します。 .. list-table:: :stub-columns: 1 * - HTTP メソッド - POST * - 認証が必要か - YES ~~~~~~~~~~ パラメータ ~~~~~~~~~~ 特別に記載されていない限り、全てのパラメータはオプショナルです。 .. list-table:: :stub-columns: 1 :widths: 10 10 80 * - USER_ID - HZXXY3 - **必須** 設定したいユーザのID。ユーザはfriendである必要があります。 * - value - false - **必須** True か false ~~~~~~~~~~ レスポンス ~~~~~~~~~~ .. list-table:: :widths: 10 90 :stub-columns: 1 * - user - そのユーザの :ref:`responses-user`