Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
New Changes to Check In API
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rob Mack  
View profile  
 More options Feb 25 2011, 6:02 pm
From: Rob Mack <r...@robmack.com>
Date: Fri, 25 Feb 2011 15:02:44 -0800 (PST)
Local: Fri, Feb 25 2011 6:02 pm
Subject: New Changes to Check In API
Hi Everyone,

We're making some improvements to the Check In API to make it more
flexible. The Check In API will now respond to the accept header so
you can request HTML, JSON or plain text. As part of these changes, we
are also deprecating the old paginated check in success screen that is
stored in detail_html. If you are currently parsing or displaying the
detail_html or the detail_text attributes in your app, you will need
to take some action by March 9th.

== BACKGROUND ==

The Check In API currently returns a JSON object. Inside this JSON
object is a detail_html attribute that contains the HTML for the check
in success screen. We'd like to move away from embedding the HTML
inside of JSON and base the response format on the request's accept
header.

== CHECK IN API AND THE ACCEPT HEADER ==

The Check In API now responds appropriately to the 'text/plain' and
'text/html' accept headers. We are also providing a JSON
representation of the check in success screen. Since the call
currently responds to to the 'application/json' accept header, you
will need to add json_only=true to the parameter list in the interim
to receive the new JSON version of the check in success screen.

The changes also apply to the Check In Test API (https://
api.gowalla.com/checkins/test). The Check In Test API now supports
'text/html', 'text/plain' and 'application/json' with the
json_only=true parameter.

You can see sample JSON/HTML/Text representations by the following
calls to the Checkin Test API:

curl <normal check in options> -H 'Accept: text/plain' 'http://
gowalla.com/checkins/test'
curl <normal check in options> -H 'Accept: text/html' 'http://
gowalla.com/checkins/test'
curl <normal check in options> -H 'Accept: application/json' -d
"json_only=true" 'http://gowalla.com/checkins/test'

Note that if you are requesting the new JSON version of the check in
success screen you will need to send the json_only=true parameter.

== NEW JSON RESPONSE ==

A sample JSON response is included below.

The new JSON structure differs from the old structure in a few ways.
"detail_html" and "detail_text" are no longer present. The new JSON
response contains a "components" array. Each component corresponds to
a section of the check in receipt. Each component has a type, possible
values are 'note', 'pin', 'item', 'highlight', 'leaderboard', 'news'.
Each component may have a heading, message, image_url and 1 or more
buttons. Buttons are meant to represent actions that the user can take
on that specific component. This is most often seen as "tweet this"
buttons when a user receives a pin. We sometimes add special buttons
to promotional sections on the receipt, for example, to request more
info on a promotion or to friend a specific Gowalla user. Components
will also have additional attributes based on their type. The pin
component will have a trip attribute with limited info on the trip.
The idea here is to provide a basic structure that could be iterated
over and rendered using the heading/message/image/buttons while also
allowing the consumer to identify each component type in order to
apply special rendering.

As part of this change, we are deprecating the old paginated html
check in screens with the orange "next" and "prev" buttons at the top
in favor of the new receipt style layout. On March 9th, we will start
returning the new receipt style html in the detail_html of the old
JSON call.

If you are relying on parsing the old HTML message stored in the
detail_html attribute and need more time to migrate, please let me
know (r...@gowalla.com) and we can continue to return the old style
html for your app until you can update your code to use the either the
HTML version or the JSON version depending on what makes the most
sense for your app.

== RECOMMENDED MIGRATION PATHS ==

Here are our recommendations based on possible use cases of the Check
In API.

Scenario: You are not parsing or displaying the detail_html from the
Check In API
Recommended path: You can safely ignore this

Scenario: You are displaying the entire html that is currently
contained in the detail_html
Recommendation: Make the call with an accept header of 'text/html' and
just display the results. If no action is taken your app will continue
to work, but the html will change to the new receipt style HTML on
March 9th.

Scenario: You are displaying the detail_text field
Recommended path: Send an accept header of 'plain/text' to get the
text representation of the check in screen. There is currently no
timeframe on when we will remove the detail_text field from the JSON
response, so you don't have to update by March 9, 2011.

Scenario: You are parsing the detail_html and displaying customized
information from the check in screen
Recommended path: Make the call with an accept header of 'application/
json' and include the json_only=true parameter. Parse the resulting
JSON and display the appropriate information.

Scenario: You are parsing the detail_html but won't be able to change
your app by March 9, 2011.
Recommended path: Let me know (r...@gowalla.com) and we can continue
returning the old detail_html for your API key until you can make the
switch.

At some point in the future, the summer at the earliest, the
detail_html and detail_text attributes will likely go away as we move
toward determining the response based on the accept header. We will
post here before we make that change.

Please let me know if you have any questions, comments or concerns. We
hope that this change gives you more flexibility with the check in
receipt screen.

Thanks,

Rob Mack

== NEW JSON CHECK IN EXAMPLE ==

{
   "created_at":"2011-02-25T21:54:45Z",
   "components":[
      {
         "buttons":[
            {
               "button_url":"http://gowalla.com/special_url?
token=foobar",
               "button_method":"post",
               "button_text":"Tap for good luck"
            }
         ],
         "type":"news",
         "heading":"Congrats!",
         "message":"You may already be a winner."
      },
      {
         "created_at":"2011-02-24T21:54:46Z",
         "creator":{
            "name":"Team Gowalla",
            "image_url":"http://s3.amazonaws.com/static.gowalla.com/
users/1934-standard.jpg?1251325516",
            "url":"/users/1934"
         },
         "type":"note",
         "heading":"Team Gowalla left you a note",
         "message":"Thanks for using the Gowalla API!"
      },
      {
         "name":"Cup o' Joe",
         "completed_on":"2009-10-22T19:08:26Z",
         "image_url":"http://static.gowalla.com/trips/4-
c1239257221d01adf574ac61cd840dfe-100.png",
         "_image_url_200":"http://static.gowalla.com/trips/4-
c1239257221d01adf574ac61cd840dfe-100.png",
         "success_message":"You earned the Cup o' Joe Pin by checking
in at 10 coffeeshops!",
         "url":"/trips/4",
         "type":"pin",
         "heading":[
            "Challenge Completed",
            "You earned the Cup o' Joe Pin by checking in at 10
coffeeshops!"
         ],
         "trip":{
            "url":"/trips/4",
            "type":"challenge"
         },
         "issue_number":12345,
         "message":"You earned the Cup o' Joe Pin by checking in at 10
coffeeshops!"
      },
      {
         "name":"a Big Bag o' Swag",
         "image_url":"http://static.gowalla.com/kinds/
1456-2ef5deab30691d3539d6e3f590fbb94f-100.png",
         "_image_url_200":"http://static.gowalla.com/kinds/
1456-7e814487956e7ebe82efc94b8a99326a-200.png",
         "url":"/items/74792",
         "type":"item",
         "heading":"You received a Big Bag o' Swag",
         "issue_number":9,
         "message":"This item has been added to your pack"
      },
      {
         "comment":"I think I could come here every day and not tire
of it.",
         "name":"My Happy Place",
         "image_url":"http://static.gowalla.com/highlight_types/
3-57680f6a2be18e3f6fdd98e46684a176-50.png",
         "updated_at":"2010-07-14T00:17:11Z",
         "url":"/spots/9263/highlights",
         "type":"highlight",
         "heading":"My Happy Place",
         "highlight_type":{
            "name":"My Happy Place",
            "image_url":"http://static.gowalla.com/highlight_types/
3-57680f6a2be18e3f6fdd98e46684a176-50.png",
            "url":"/highlights/my-happy-place"
         },
         "message":"I think I could come here every day and not tire
of it.",
         "user":{
            "name":"Scott Raymond",
            "image_url":"http://s3.amazonaws.com/static.gowalla.com/
users/1-standard.jpg?1296490509",
            "url":"/users/1",
            "username":"sco",
            "last_name":"Raymond",
            "hometown":"Austin, Texas",
            "first_name":"Scott"
         }
      },
      {
         "type":"leaderboard",
         "users":[
            {
               "name":"John Critz",
               "position":1,
               "image_url":"http://s3.amazonaws.com/static.gowalla.com/
users/4-standard.jpg?1268694394",
               "url":"/users/4",
               "checkin_count":"12"
            },
            {
               "name":"Adam McManus",
               "position":2,
               "image_url":"http://s3.amazonaws.com/static.gowalla.com/
users/3-standard.jpg?1236873337",
               "url":"/users/3",
               "checkin_count":"5"
            },
            {
               "name":"Keegan Jones",
               "position":3,
               "image_url":"http://s3.amazonaws.com/static.gowalla.com/
users/5-standard.jpg?1297871530",
               "url":"/users/5",
               "checkin_count":"3"
            }
         ],
         "duration_in_days":90
      },
      {
         "type":"news",
         "message":"Thanks for going out with Gowalla!"
      }
   ],
...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd G  
View profile  
 More options Feb 26 2011, 5:24 pm
From: Todd G <tginsb...@gmail.com>
Date: Sat, 26 Feb 2011 14:24:12 -0800 (PST)
Local: Sat, Feb 26 2011 5:24 pm
Subject: Re: New Changes to Check In API
This is awesome!  Good work guys.

While you are making changes - any chance you'll expose Tumblr and 4sq
push permissions in both /users/me (flags to indicate user ability)
and checkins (actually push to 4sq/Tumblr)?  I realize the checkin
flags exist, but they aren't public (yet).

Thanks!

On Feb 25, 5:02 pm, Rob Mack <r...@robmack.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Dodson  
View profile   Translate to Translated (View Original)
 More options Feb 27 2011, 5:33 am
From: Ben Dodson <b...@bendodson.com>
Date: Sun, 27 Feb 2011 02:33:19 -0800 (PST)
Local: Sun, Feb 27 2011 5:33 am
Subject: Re: New Changes to Check In API
Hi Rob,

Just wanted to thank you for the incredibly detailed announcement -
having a set time for API switchovers and the ability to email you to
get excluded from it temporarily is a really good step forward for the
Gowalla API :)

Thanks again,

Ben

On Feb 26, 10:24 pm, Todd G <tginsb...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
E  
View profile  
 More options Mar 22 2011, 6:45 pm
From: E <kxc...@gmail.com>
Date: Tue, 22 Mar 2011 15:45:10 -0700 (PDT)
Local: Tues, Mar 22 2011 6:45 pm
Subject: Re: New Changes to Check In API
Hello,

I'm having the following problem with retrieving html from the new
checkin api.

My program currently uses the old checkin api with "accept" set to
"application/json", and I receive a json string as expected.  If I
change the accept header to "text/html", I receive a NotFound error
from the server.

Am I correct in assuming that the only thing I need to change is the
accept header to get this to work?

Thanks,
-Ed

On Feb 27, 5:33 am, Ben Dodson <b...@bendodson.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Floering  
View profile  
 More options Mar 25 2011, 5:43 pm
From: Benjamin Floering <benfloer...@gmail.com>
Date: Fri, 25 Mar 2011 14:43:58 -0700
Local: Fri, Mar 25 2011 5:43 pm
Subject: Re: New Changes to Check In API

Hi,

I have started using the new json_only mode on footfeed.com and it is
working well so far.  I'm noticing a new type of "component" that was not in
this original spec: the "recent_friends" that goes something like: (not
valid json but you get the idea)

{ component_type:"recent_friends",
  recent_friends:[
    checked_in_at:"2011-03-25T21:13:47Z",
    image_url:"
http://s3.amazonaws.com/static.gowalla.com/users/xxxxx-standard.jpg",
    name:"John Doe",
    url:"/users/xxxxx"
  ]

}

I was wondering if we can get the "component_type" changed to "type" to be
consistent with the other components and this part of the "test" checkin
response please?

Thanks,
-Ben

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Mack  
View profile  
 More options Mar 28 2011, 1:26 pm
From: Rob Mack <r...@robmack.com>
Date: Mon, 28 Mar 2011 10:26:26 -0700 (PDT)
Local: Mon, Mar 28 2011 1:26 pm
Subject: Re: New Changes to Check In API

"component_type" is now "type" for recent_friends.

Thanks!

-Rob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »