FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17694&edit=1

ID: 17694
Comment by: steve@twitpic.com
Reported By: steve at twitpic dot com
Summary: Support for users/lookup, geo/search, and geo/id
Status: Open
Type: Feature/Change Request
Package: Services_Twitter
Operating System: FreeBSD
Package Version: 0.6.2
PHP Version: Irrelevant
Roadmap Versions:
New Comment:

Here is the patch- the "Add patch" system is not letting me upload
patch.txt for whatever reason.


239a240,245
<endpoint name="lookup" method="GET" auth_required="true"
min_args="1">
<formats>xml,json</formats>
<param name="user_id" type="string" required="false"/>
<param name="screen_name" type="string"
required="false"/>
<param name="include_entities" type="boolean"
required="false"/>
</endpoint> 471a478
<param name="result_type" type="string" required="false"/>
502c509,527
<
---
<!-- Geo API Methods -->
<category name="geo">
<endpoint name="search" method="GET" min_args="1"
auth_required="false">
<formats>json</formats>
<param name="lat" type="lat"
required="false"/>
<param name="long" type="long"
required="false"/>
<param name="query" type="string"
required="false"/>
<param name="ip" type="string"
required="false"/>
<param name="granularity" type="string"
required="false"/>
<param name="accuracy" type="string"
required="false"/>
<param name="max_results" type="integer"
required="false"/>
<param name="contained_within" type="string"
required="false"/>
<param name="autocomplete" type="boolean"
required="false"/>
</endpoint>
<endpoint name="id" method="GET" auth_required="true"
routing="/geo/id/:place_id">
<formats>json</formats>
<param name="place_id" type="string"
required="true"/>
</endpoint>
</category>

Previous Comments:
------------------------------------------------------------------------

[2010-08-11 15:19:46] steve_twitpic

Description:
------------
We use Services_Twitter extensively at Twitpic and wanted to
push some
of the API endpoints that we added back to you.

users/lookup - http://dev.twitter.com/doc/get/users/lookup
geo/search - http://dev.twitter.com/doc/get/geo/search
geo/id/ - http://dev.twitter.com/doc/get/geo/id/:place_id

NOTE: I had to add user_id and screen_name as type "string"
and not
"id_or_screenname" because these parameters take a CSV list
of ids or
screenames (you can pull up to 100 users at a time with the
API call).
There may be a better way to implement this, but it was the
easiest way
for us.

Test script:
---------------
$twitter = new Services_Twitter;
$twitter->users->lookup(array('user_id' => '12345'));
$twitter->geo->search(array('lat'=>90, 'long'=>90));
$twitter->geo->id(array('place_id' => 'abcdef123456'));

------------------------------------------------------------------------

Search Discussions

  • Daniel Oconnor at Aug 14, 2010 at 2:03 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=17694&edit=1

    ID: 17694
    Updated by: daniel.oconnor@gmail.com
    Reported By: steve at twitpic dot com
    Summary: Support for users/lookup, geo/search, and geo/id
    Status: Open
    Type: Feature/Change Request
    Package: Services_Twitter
    Operating System: FreeBSD
    Package Version: 0.6.2
    PHP Version: Irrelevant
    Roadmap Versions:
    New Comment:

    Cheers for the patch Steve!


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-11 15:26:26] steve_twitpic

    Here is the patch- the "Add patch" system is not letting me upload
    patch.txt for whatever reason.


    239a240,245
    <endpoint name="lookup" method="GET" auth_required="true"
    min_args="1">
    <formats>xml,json</formats>
    <param name="user_id" type="string" required="false"/>
    <param name="screen_name" type="string"
    required="false"/>
    <param name="include_entities" type="boolean"
    required="false"/>
    </endpoint> 471a478
    <param name="result_type" type="string" required="false"/>
    502c509,527
    <
    ---
    <!-- Geo API Methods -->
    <category name="geo">
    <endpoint name="search" method="GET" min_args="1"
    auth_required="false">
    <formats>json</formats>
    <param name="lat" type="lat"
    required="false"/>
    <param name="long" type="long"
    required="false"/>
    <param name="query" type="string"
    required="false"/>
    <param name="ip" type="string"
    required="false"/>
    <param name="granularity" type="string"
    required="false"/>
    <param name="accuracy" type="string"
    required="false"/>
    <param name="max_results" type="integer"
    required="false"/>
    <param name="contained_within" type="string"
    required="false"/>
    <param name="autocomplete" type="boolean"
    required="false"/>
    </endpoint>
    <endpoint name="id" method="GET" auth_required="true"
    routing="/geo/id/:place_id">
    <formats>json</formats>
    <param name="place_id" type="string"
    required="true"/>
    </endpoint>
    </category>
    ------------------------------------------------------------------------

    [2010-08-11 15:19:46] steve_twitpic

    Description:
    ------------
    We use Services_Twitter extensively at Twitpic and wanted to
    push some
    of the API endpoints that we added back to you.

    users/lookup - http://dev.twitter.com/doc/get/users/lookup
    geo/search - http://dev.twitter.com/doc/get/geo/search
    geo/id/ - http://dev.twitter.com/doc/get/geo/id/:place_id

    NOTE: I had to add user_id and screen_name as type "string"
    and not
    "id_or_screenname" because these parameters take a CSV list
    of ids or
    screenames (you can pull up to 100 users at a time with the
    API call).
    There may be a better way to implement this, but it was the
    easiest way
    for us.

    Test script:
    ---------------
    $twitter = new Services_Twitter;
    $twitter->users->lookup(array('user_id' => '12345'));
    $twitter->geo->search(array('lat'=>90, 'long'=>90));
    $twitter->geo->id(array('place_id' => 'abcdef123456'));

    ------------------------------------------------------------------------
  • Daniel Oconnor at Aug 14, 2010 at 2:03 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=17694&edit=1

    ID: 17694
    Updated by: daniel.oconnor@gmail.com
    Reported By: steve at twitpic dot com
    Summary: Support for users/lookup, geo/search, and geo/id
    -Status: Open
    +Status: Analyzed
    Type: Feature/Change Request
    Package: Services_Twitter
    Operating System: FreeBSD
    Package Version: 0.6.2
    PHP Version: Irrelevant
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Analyzed



    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-14 14:03:34] doconnor

    Cheers for the patch Steve!

    ------------------------------------------------------------------------

    [2010-08-11 15:26:26] steve_twitpic

    Here is the patch- the "Add patch" system is not letting me upload
    patch.txt for whatever reason.


    239a240,245
    <endpoint name="lookup" method="GET" auth_required="true"
    min_args="1">
    <formats>xml,json</formats>
    <param name="user_id" type="string" required="false"/>
    <param name="screen_name" type="string"
    required="false"/>
    <param name="include_entities" type="boolean"
    required="false"/>
    </endpoint> 471a478
    <param name="result_type" type="string" required="false"/>
    502c509,527
    <
    ---
    <!-- Geo API Methods -->
    <category name="geo">
    <endpoint name="search" method="GET" min_args="1"
    auth_required="false">
    <formats>json</formats>
    <param name="lat" type="lat"
    required="false"/>
    <param name="long" type="long"
    required="false"/>
    <param name="query" type="string"
    required="false"/>
    <param name="ip" type="string"
    required="false"/>
    <param name="granularity" type="string"
    required="false"/>
    <param name="accuracy" type="string"
    required="false"/>
    <param name="max_results" type="integer"
    required="false"/>
    <param name="contained_within" type="string"
    required="false"/>
    <param name="autocomplete" type="boolean"
    required="false"/>
    </endpoint>
    <endpoint name="id" method="GET" auth_required="true"
    routing="/geo/id/:place_id">
    <formats>json</formats>
    <param name="place_id" type="string"
    required="true"/>
    </endpoint>
    </category>
    ------------------------------------------------------------------------

    [2010-08-11 15:19:46] steve_twitpic

    Description:
    ------------
    We use Services_Twitter extensively at Twitpic and wanted to
    push some
    of the API endpoints that we added back to you.

    users/lookup - http://dev.twitter.com/doc/get/users/lookup
    geo/search - http://dev.twitter.com/doc/get/geo/search
    geo/id/ - http://dev.twitter.com/doc/get/geo/id/:place_id

    NOTE: I had to add user_id and screen_name as type "string"
    and not
    "id_or_screenname" because these parameters take a CSV list
    of ids or
    screenames (you can pull up to 100 users at a time with the
    API call).
    There may be a better way to implement this, but it was the
    easiest way
    for us.

    Test script:
    ---------------
    $twitter = new Services_Twitter;
    $twitter->users->lookup(array('user_id' => '12345'));
    $twitter->geo->search(array('lat'=>90, 'long'=>90));
    $twitter->geo->id(array('place_id' => 'abcdef123456'));

    ------------------------------------------------------------------------
  • Izi at Aug 15, 2010 at 9:52 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17694&edit=1

    ID: 17694
    Updated by: izi@php.net
    Reported By: steve at twitpic dot com
    Summary: Support for users/lookup, geo/search, and geo/id
    -Status: Analyzed
    +Status: Feedback
    Type: Feature/Change Request
    Package: Services_Twitter
    Operating System: FreeBSD
    Package Version: 0.6.2
    PHP Version: Irrelevant
    -Assigned To:
    +Assigned To: izi
    Roadmap Versions:
    New Comment:

    -Status: Analyzed
    +Status: Feedback
    -Assigned To:
    +Assigned To: izi
    Hi Stephen, thanks !

    I've applied your patch (along with some minor updates):
    http://svn.php.net/viewvc/pear/packages/Services_Twitter/trunk/data/api.xml?r1=302262&r2=302261&pathrev=302262

    But for some reason I'm getting 400 Bad request errors with the geo
    methods, could you have a look at it please ?

    --
    David


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-14 14:03:43] doconnor

    -Status: Open
    +Status: Analyzed


    ------------------------------------------------------------------------

    [2010-08-14 14:03:34] doconnor

    Cheers for the patch Steve!

    ------------------------------------------------------------------------

    [2010-08-11 15:26:26] steve_twitpic

    Here is the patch- the "Add patch" system is not letting me upload
    patch.txt for whatever reason.


    239a240,245
    <endpoint name="lookup" method="GET" auth_required="true"
    min_args="1">
    <formats>xml,json</formats>
    <param name="user_id" type="string" required="false"/>
    <param name="screen_name" type="string"
    required="false"/>
    <param name="include_entities" type="boolean"
    required="false"/>
    </endpoint> 471a478
    <param name="result_type" type="string" required="false"/>
    502c509,527
    <
    ---
    <!-- Geo API Methods -->
    <category name="geo">
    <endpoint name="search" method="GET" min_args="1"
    auth_required="false">
    <formats>json</formats>
    <param name="lat" type="lat"
    required="false"/>
    <param name="long" type="long"
    required="false"/>
    <param name="query" type="string"
    required="false"/>
    <param name="ip" type="string"
    required="false"/>
    <param name="granularity" type="string"
    required="false"/>
    <param name="accuracy" type="string"
    required="false"/>
    <param name="max_results" type="integer"
    required="false"/>
    <param name="contained_within" type="string"
    required="false"/>
    <param name="autocomplete" type="boolean"
    required="false"/>
    </endpoint>
    <endpoint name="id" method="GET" auth_required="true"
    routing="/geo/id/:place_id">
    <formats>json</formats>
    <param name="place_id" type="string"
    required="true"/>
    </endpoint>
    </category>
    ------------------------------------------------------------------------

    [2010-08-11 15:19:46] steve_twitpic

    Description:
    ------------
    We use Services_Twitter extensively at Twitpic and wanted to
    push some
    of the API endpoints that we added back to you.

    users/lookup - http://dev.twitter.com/doc/get/users/lookup
    geo/search - http://dev.twitter.com/doc/get/geo/search
    geo/id/ - http://dev.twitter.com/doc/get/geo/id/:place_id

    NOTE: I had to add user_id and screen_name as type "string"
    and not
    "id_or_screenname" because these parameters take a CSV list
    of ids or
    screenames (you can pull up to 100 users at a time with the
    API call).
    There may be a better way to implement this, but it was the
    easiest way
    for us.

    Test script:
    ---------------
    $twitter = new Services_Twitter;
    $twitter->users->lookup(array('user_id' => '12345'));
    $twitter->geo->search(array('lat'=>90, 'long'=>90));
    $twitter->geo->id(array('place_id' => 'abcdef123456'));

    ------------------------------------------------------------------------
  • Steve at Aug 19, 2010 at 1:53 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17694&edit=1

    ID: 17694
    Comment by: steve@twitpic.com
    Reported By: steve at twitpic dot com
    Summary: Support for users/lookup, geo/search, and geo/id
    Status: Feedback
    Type: Feature/Change Request
    Package: Services_Twitter
    Operating System: FreeBSD
    Package Version: 0.6.2
    PHP Version: Irrelevant
    Assigned To: izi
    Roadmap Versions:
    New Comment:

    It works for me. Try this:

    $t = new Services_Twitter();
    print_r($t->geo->id("247f43d441defc03"));
    print_r($t->geo->search(array("lat" => "37.7821120598956", "long" =>
    "-122.400612831116")));


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-15 09:52:35] izi

    -Status: Analyzed
    +Status: Feedback
    -Assigned To:
    +Assigned To: izi
    Hi Stephen, thanks !

    I've applied your patch (along with some minor updates):
    http://svn.php.net/viewvc/pear/packages/Services_Twitter/trunk/data/api.xml?r1=302262&r2=302261&pathrev=302262

    But for some reason I'm getting 400 Bad request errors with the geo
    methods, could you have a look at it please ?

    --
    David

    ------------------------------------------------------------------------

    [2010-08-14 14:03:43] doconnor

    -Status: Open
    +Status: Analyzed


    ------------------------------------------------------------------------

    [2010-08-14 14:03:34] doconnor

    Cheers for the patch Steve!

    ------------------------------------------------------------------------

    [2010-08-11 15:26:26] steve_twitpic

    Here is the patch- the "Add patch" system is not letting me upload
    patch.txt for whatever reason.


    239a240,245
    <endpoint name="lookup" method="GET" auth_required="true"
    min_args="1">
    <formats>xml,json</formats>
    <param name="user_id" type="string" required="false"/>
    <param name="screen_name" type="string"
    required="false"/>
    <param name="include_entities" type="boolean"
    required="false"/>
    </endpoint> 471a478
    <param name="result_type" type="string" required="false"/>
    502c509,527
    <
    ---
    <!-- Geo API Methods -->
    <category name="geo">
    <endpoint name="search" method="GET" min_args="1"
    auth_required="false">
    <formats>json</formats>
    <param name="lat" type="lat"
    required="false"/>
    <param name="long" type="long"
    required="false"/>
    <param name="query" type="string"
    required="false"/>
    <param name="ip" type="string"
    required="false"/>
    <param name="granularity" type="string"
    required="false"/>
    <param name="accuracy" type="string"
    required="false"/>
    <param name="max_results" type="integer"
    required="false"/>
    <param name="contained_within" type="string"
    required="false"/>
    <param name="autocomplete" type="boolean"
    required="false"/>
    </endpoint>
    <endpoint name="id" method="GET" auth_required="true"
    routing="/geo/id/:place_id">
    <formats>json</formats>
    <param name="place_id" type="string"
    required="true"/>
    </endpoint>
    </category>
    ------------------------------------------------------------------------

    [2010-08-11 15:19:46] steve_twitpic

    Description:
    ------------
    We use Services_Twitter extensively at Twitpic and wanted to
    push some
    of the API endpoints that we added back to you.

    users/lookup - http://dev.twitter.com/doc/get/users/lookup
    geo/search - http://dev.twitter.com/doc/get/geo/search
    geo/id/ - http://dev.twitter.com/doc/get/geo/id/:place_id

    NOTE: I had to add user_id and screen_name as type "string"
    and not
    "id_or_screenname" because these parameters take a CSV list
    of ids or
    screenames (you can pull up to 100 users at a time with the
    API call).
    There may be a better way to implement this, but it was the
    easiest way
    for us.

    Test script:
    ---------------
    $twitter = new Services_Twitter;
    $twitter->users->lookup(array('user_id' => '12345'));
    $twitter->geo->search(array('lat'=>90, 'long'=>90));
    $twitter->geo->id(array('place_id' => 'abcdef123456'));

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 11, '10 at 3:26p
activeAug 19, '10 at 1:53a
posts5
users3
websitepear.php.net

3 users in discussion

Daniel Oconnor: 2 posts Steve: 2 posts Izi: 1 post

People

Translate

site design / logo © 2022 Grokbase