├── README.md └── sections ├── account.md ├── data_reference.md ├── messages.md ├── rooms.md ├── search.md ├── streaming.md ├── transcripts.md ├── uploads.md └── users.md /README.md: -------------------------------------------------------------------------------- 1 | Campfire API 2 | ============ 3 | 4 | The Campfire API is implemented as vanilla XML/JSON over HTTP. You can explore the view part of the API (everything that's fetched with GET) through a regular browser. Using Firefox for this is particularly nice as it has a good, simple XML renderer (unlike Safari which just strips the tags and dumps the content). 5 | 6 | 7 | Wrappers and example code 8 | ------------------------- 9 | 10 | **Ruby** 11 | * [Tinder](http://github.com/collectiveidea/tinder) 12 | * [Broach](http://github.com/Manfred/broach) 13 | 14 | **Python** 15 | * [Pinder](http://github.com/rhymes/pinder) 16 | * [pyfire](https://github.com/mariano/pyfire) 17 | * [Camplight](https://github.com/mlafeldt/camplight) 18 | 19 | **Objective-C** 20 | * [Crackle](https://github.com/jordanekay/Crackle) 21 | * [HappyCamprFramework](https://github.com/blladnar/HappyCamprFramework/) 22 | 23 | **PHP** 24 | * [IceCube](http://labs.mimmin.com/icecube/) 25 | 26 | **Java** 27 | * [Jinder](https://github.com/flintinatux/jinder) 28 | * [campfireclient](http://github.com/alandipert/campfireclient) 29 | 30 | **C#** 31 | * [ccnet.campfire.plugin](http://github.com/alexscordellis/ccnet.campfire.plugin) 32 | 33 | **Erlang** 34 | * [ecampfire](https://github.com/0xAX/ecampfire) 35 | 36 | **Go** 37 | * [gofire](https://github.com/dmathieu/gofire) 38 | 39 | 40 | Wrote your own API wrapper? Feel free to open a pull request and add to this list! 41 | 42 | 43 | API Endpoints 44 | ------------- 45 | 46 | * [Account](https://github.com/37signals/campfire-api/blob/master/sections/account.md) 47 | * [Rooms](https://github.com/37signals/campfire-api/blob/master/sections/rooms.md) 48 | * [Search](https://github.com/37signals/campfire-api/blob/master/sections/search.md) 49 | * [Messages](https://github.com/37signals/campfire-api/blob/master/sections/messages.md) 50 | * [Transcripts](https://github.com/37signals/campfire-api/blob/master/sections/transcripts.md) 51 | * [Users](https://github.com/37signals/campfire-api/blob/master/sections/users.md) 52 | * [Uploads](https://github.com/37signals/campfire-api/blob/master/sections/uploads.md) 53 | * [Streaming](https://github.com/37signals/campfire-api/blob/master/sections/streaming.md) 54 | 55 | (Hint: Press `t` to enable the file finder and type out the endpoint you need!) 56 | 57 | Need a sample of each XML blob will look like? Check out the [Data Reference](https://github.com/37signals/campfire-api/blob/master/sections/data_reference.md). 58 | 59 | 60 | Authentication 61 | -------------- 62 | 63 | When you're using the API, it's always through an existing user in Campfire. There's no special API user. So when you use the API as "david", you get to see and work with what "david" is allowed to. Authenticating is done with an authentication token, which you'll find on the "My info" screen in Campfire. 64 | 65 | When using the authentication token, you don't need a separate password. But since Campfire uses [HTTP Basic Authentication](http://www.ietf.org/rfc/rfc2617.txt), and lots of implementations assume that you want to have a password, it's often easier just to pass in a dummy password, like X. 66 | 67 | Example using the authentication token and a dummy password through curl: 68 | 69 | curl -u 605b32dd:X https://sample.campfirenow.com/room/1.xml 70 | 71 | curl -u 605b32dd:X https://sample.campfirenow.com/room/2.json 72 | 73 | Remember that anyone who has your authentication token can see and change everything you have access to. So you want to guard that as well as you guard your username and password. If you come to fear that it has been compromised, just change your regular password and the authentication token will change too. 74 | 75 | The single exception to using the token for authentication is with the `/users/me.xml` endpoint, which may be accessed with the username and password of the authenticating user. The resulting XML will include (among other things) a `` element, containing the user's API token. This token can then be used for subsequent requests. 76 | 77 | If you're making a public integration with Campfire for others to enjoy, you can also use OAuth 2. This allows users to authorize your application to use Campfire on their behalf without having to copy/paste API tokens or touch sensitive login info. 78 | 79 | Read the [37signals API Authentication Guide](https://github.com/37signals/api/tree/master/sections/authentication.md) for more info on using OAuth. 80 | 81 | Identify your app 82 | ----------------- 83 | 84 | You should include a `User-Agent` header with the name of your application and a link to it or your email address so we can get in touch in case you're doing something wrong (so we may warn you before you're blacklisted) or something awesome (so we may congratulate you). Here's a couple of examples: 85 | 86 | User-Agent: Freshbooks (http://freshbooks.com/contact.php) 87 | User-Agent: Fabian's Ingenious Integration (fabian@example.com) 88 | 89 | Reading through the API 90 | ----------------------- 91 | 92 | The Campfire API has two category of actions for reading: Get one, or get many. All these actions are done through an HTTP GET, which also means that they're all easily explorable through a browser as described above. 93 | 94 | Here's a few examples of reading with curl: 95 | 96 | curl -u 605b32dd:X https://sample.campfirenow.com/rooms.xml 97 | 98 | curl -u 605b32dd:X https://sample.campfirenow.com/room/1.xml 99 | 100 | If the read is successful, you'll get an XML response back along with the status code `200 OK`. 101 | 102 | 103 | Writing through the API 104 | ----------------------- 105 | 106 | Writing through the API is almost as easy as reading, but you can't explore it as easily through the browser. Regardless of your implementation language, though, using curl to play first is a great idea. It makes it very easy to explore the API and is perfect for small scripts too. 107 | 108 | When you're writing through the API, you'll be sending XML or JSON to Campfire. You need to let the system know that fact by adding the appropriate content type header : `Content-type: application/xml` or `Content-type: application/json`. Then you just include the XML or JSON of the resource in the body of your request. 109 | 110 | Here's a few examples creating new resources, first with the XML inline, second referencing the XML from a file: 111 | 112 | curl -u 605b32dd:X -H 'Content-Type: application/xml' \ 113 | -d 'Hello' https://sample.campfirenow.com/room/1/speak.xml 114 | 115 | curl -u 605b32dd:X -H 'Content-Type: application/xml' \ 116 | -d @message.xml https://sample.campfirenow.com/room/1/speak.xml 117 | 118 | Similarly, if you want to use JSON: 119 | 120 | curl -u 605b32dd:X -H 'Content-Type: application/json' \ 121 | -d '{"message":{"body":"Hello"}}' https://sample.campfirenow.com/room/1/speak.json 122 | 123 | The response to a successful write operation is the status code `201 Created`. We also include the complete XML or JSON for the final resource in the response. This is because you can usually get away with creating a new resource with less than all its regular attributes. 124 | 125 | 126 | Dealing with failure 127 | -------------------- 128 | 129 | If a request fails, the error information is returned with the HTTP status code. For instance, if a requested record could not be found, the HTTP response might look something like: 130 | 131 | HTTP/1.1 404 The record could not be found 132 | Date: Thu, 16 Mar 2006 17:41:40 GMT 133 | ... 134 | 135 | Note that, in general, if a request causes a new record to be created (like a new message, or to-do item, etc.), the response will use the `201 Created` status. Any other successful operation (like a successful query, delete, or update) will use a `200 OK` status code. 136 | 137 | Rate limiting 138 | ------------- 139 | 140 | You can perform up to 500 requests per 10 second period from the same IP address for the same account. If you exceed this limit, you'll get a `503 Service Unavailable` response for subsequent requests. Check the `Retry-After` header to see how many seconds to wait before retrying the request. 141 | 142 | SSL Usage 143 | --------- 144 | 145 | A non-SSL request made against an account will receive a "302 Found" response. The Location header will contain the correct SSL URI. 146 | 147 | 148 | Documentation Conventions 149 | ------------------------- 150 | 151 | To make things easier to understand, the following notation is used: 152 | 153 | * `#{text}`: Indicates text that should be replaced by your own data 154 | * `...`: Indicates content from the response has been elided for brevity in documentation. See the list of data responses at the end of the page for a full description of the format of that response type. 155 | 156 | 157 | Help us make it better 158 | ---------------------- 159 | 160 | Please tell us how we can make this API better. If you have a specific feature request or if you found a bug, please [open a support ticket](https://support.campfire-help.com/contact). Also, feel free to fork these docs and send a pull request with improvements! 161 | 162 | To talk with us and other developers about the API, subscribe to the [37signals-api mailing list](http://groups.google.com/group/37signals-api). 163 | -------------------------------------------------------------------------------- /sections/account.md: -------------------------------------------------------------------------------- 1 | Account 2 | ======= 3 | 4 | The account API is currently just for reading, not writing. Any authenticated user has access. 5 | 6 | Get account 7 | ----------- 8 | 9 | * `GET /account.xml` returns info about the current account. 10 | 11 | This endpoint includes: 12 | 13 | * account id, subdomain, and name 14 | * plan name (max, plus, etc.) 15 | * owner’s user ID 16 | * time zone in [tz format](https://en.wikipedia.org/wiki/Zone.tab) 17 | * total storage used in bytes 18 | * creation and last-update timestamps 19 | 20 | **Response:** 21 | 22 | ``` xml 23 | 24 | 1 25 | Your Company 26 | yourco 27 | premium 28 | #{user_id of account owner} 29 | America/Chicago 30 | 17374444 31 | 2011-01-12T15:00:00Z 32 | 2011-01-12T15:00:00Z 33 | 34 | ``` 35 | -------------------------------------------------------------------------------- /sections/data_reference.md: -------------------------------------------------------------------------------- 1 | Data Reference 2 | ============== 3 | 4 | The following sections describe the different data types used by the Campfire API. 5 | 6 | Message 7 | ------- 8 | 9 | ``` xml 10 | 11 | 1 12 | 1 13 | 2 14 | Hello Room 15 | 2009-11-22T23:46:58Z 16 | 17 | #{TextMessage || PasteMessage || SoundMessage || AdvertisementMessage || 18 | AllowGuestsMessage || DisallowGuestsMessage || IdleMessage || KickMessage || 19 | LeaveMessage || EnterMessage || SystemMessage || TimestampMessage || 20 | TopicChangeMessage || UnidleMessage || LockMessage || UnlockMessage || 21 | UploadMessage || ConferenceCreatedMessage || ConferenceFinishedMessage} 22 | 23 | true 24 | 25 | ``` 26 | 27 | Room 28 | ---- 29 | 30 | ``` xml 31 | 32 | 1 33 | North May St. 34 | 37signals HQ 35 | 60 36 | false 37 | true 38 | #{ 4c8fb -- requires open-to-guests is true} 39 | 2009-11-17T19:41:38Z 40 | 2009-11-17T19:41:38Z 41 | 42 | ... 43 | 44 | 45 | ``` 46 | 47 | Upload 48 | ------ 49 | 50 | ``` xml 51 | 52 | 1 53 | picture.jpg 54 | 1 55 | 1 56 | 10063 57 | image/jpeg 58 | https://account.campfirenow.com/room/1/uploads/1/picture.jpg 59 | 2009-11-20T23:25:14Z 60 | 61 | ``` 62 | 63 | User 64 | ---- 65 | 66 | ``` xml 67 | 68 | 1 69 | Jason Fried 70 | jason@37signals.com 71 | #{true || false} 72 | 2009-11-20T16:41:39Z 73 | #{Member || Guest} 74 | https://asset0.37img.com/global/.../avatar.png 75 | 76 | ``` 77 | -------------------------------------------------------------------------------- /sections/messages.md: -------------------------------------------------------------------------------- 1 | Messages 2 | ======== 3 | 4 | For the full XML representation of messages, [check out the data reference](https://github.com/37signals/campfire-api/blob/master/sections/data_reference.md#message). 5 | 6 | 7 | Create message 8 | -------------- 9 | 10 | * `POST /room/#{id}/speak.xml` sends a new message with the currently authenticated user as the sender. 11 | 12 | The XML for the new message is returned on a successful request. 13 | 14 | The valid types are: 15 | 16 | * `TextMessage` (regular chat message), 17 | * `PasteMessage` (pre-formatted message, rendered in a fixed-width font), 18 | * `SoundMessage` (plays a sound as determined by the message, which can be `56k`, `bueller`, `crickets`, `dangerzone`, `deeper`,`drama`, `greatjob`, `horn`, `horror`,`inconceivable`, 19 | `live`, `loggins`, `noooo`, `nyan`, `ohmy`, `ohyeah`, `pushit`, `rimshot`, `sax`, `secret`, `tada`, `tmyk`, `trombone`, `vuvuzela`, `yeah`, or `yodel`) 20 | * `TweetMessage` (a Twitter status URL to be fetched and inserted into the chat) 21 | 22 | If an explicit type is omitted, it will be inferred from the content (e.g., if the message contains new line characters, it will be considered a paste). 23 | 24 | Newline characters are ignored for TextMessages. In order to include newlines inside of a PasteMessage, use this escape code: ` ` 25 | 26 | **Request:** 27 | 28 | ``` xml 29 | 30 | TextMessage 31 | Hello 32 | 33 | ``` 34 | 35 | **Response:** 36 | 37 | Status: 201 Created 38 | 39 | ``` xml 40 | 41 | 1 42 | Hello 43 | 1 44 | 2 45 | 2009-11-22T19:11:41Z 46 | TextMessage 47 | false 48 | 49 | ``` 50 | 51 | Get recent messages 52 | ------------------- 53 | 54 | * `GET /room/#{id}/recent.xml` returns a collection of upto 100 recent messages in the room. 55 | 56 | This endpoint accepts two additional optional parameters: `limit` to restrict the number of messages returned and `since_message_id` to get messages created after the specified message id. 57 | 58 | **Response:** 59 | 60 | ``` xml 61 | 62 | 63 | 2010-04-15T11:03:08Z 64 | 23 65 | 1 66 | 1 67 | Hello room! 68 | TextMessage 69 | false 70 | 71 | ... 72 | 73 | ``` 74 | 75 | 76 | Highlight message 77 | ----------------- 78 | 79 | * `POST /messages/#{message_id}/star.xml` highlights a message in the room's transcript 80 | 81 | **Response:** 82 | 83 | Status: 200 OK 84 | 85 | 86 | Unhighlight message 87 | ------------------- 88 | 89 | * `DELETE /messages/#{message_id}/star.xml` removes a message highlight from the room's transcript 90 | 91 | **Response:** 92 | 93 | Status: 200 OK 94 | -------------------------------------------------------------------------------- /sections/rooms.md: -------------------------------------------------------------------------------- 1 | Rooms 2 | ===== 3 | 4 | The rooms API allows you to access information about any room under the account and lock/unlock the rooms. 5 | 6 | Check out the data reference for a full XML representation of [rooms](https://github.com/37signals/campfire-api/blob/master/sections/data_reference.md#room) and [users](https://github.com/37signals/campfire-api/blob/master/sections/data_reference.md#user) . 7 | 8 | 9 | Get rooms 10 | --------- 11 | 12 | * `GET /rooms.xml` returns a collection of the rooms that are visible to the authenticated user. 13 | * `GET /presence.xml` returns a collection of the rooms that the authenticated user is present in. 14 | 15 | **Response:** 16 | 17 | ``` xml 18 | 19 | 20 | 1 21 | North May St. 22 | 37signals HQ 23 | 60 24 | false 25 | true 26 | #{ 4c8fb -- requires open-to-guests is true} 27 | 2009-11-17T19:41:38Z 28 | 2009-11-17T19:41:38Z 29 | 30 | ... 31 | 32 | ``` 33 | 34 | 35 | Get room 36 | -------- 37 | 38 | * `GET /room/#{id}.xml` returns an existing room. 39 | 40 | This endpoint also includes all the users currently inside the room. 41 | 42 | **Response:** 43 | 44 | ``` xml 45 | 46 | 2009-11-17T19:41:38Z 47 | 1 48 | 60 49 | North May St. 50 | 37signals HQ 51 | 2009-11-17T19:41:38Z 52 | true 53 | false 54 | 4c8fb 55 | 56 | 57 | true 58 | 2009-11-20T16:41:39Z 59 | jason@37signals.com 60 | 1 61 | Jason Fried 62 | Member 63 | https://asset0.37img.com/global/.../avatar.png 64 | 65 | ... 66 | 67 | 68 | ``` 69 | 70 | 71 | Update room 72 | ----------- 73 | 74 | * `PUT /room/#{id}.xml` updates an existing room. 75 | 76 | Only admins can rename a room, although any user (except guests) may set the topic. Omitting either tag results in that attribute being ignored. To remove a room topic, simply provide an empty `topic` tag. 77 | 78 | **Request:** 79 | 80 | ``` xml 81 | 82 | #{name} 83 | #{topic} 84 | 85 | ``` 86 | 87 | **Response:** 88 | 89 | Status: 200 OK 90 | 91 | 92 | Join room 93 | --------- 94 | 95 | * `POST /room/#{id}/join.xml` joins the room for the current user 96 | 97 | **Response:** 98 | 99 | Status: 200 OK 100 | 101 | 102 | Leave room 103 | ---------- 104 | 105 | * `POST /room/#{id}/leave.xml` leaves the room for the current user 106 | 107 | **Response:** 108 | 109 | Status: 200 OK 110 | 111 | 112 | Lock room 113 | --------- 114 | 115 | * `POST /room/#{id}/lock.xml` locks a room, preventing others from joining and stops transcripts from being logged 116 | 117 | **Response:** 118 | 119 | Status: 200 OK 120 | 121 | 122 | Unlock room 123 | ----------- 124 | 125 | * `POST /room/#{id}/unlock.xml` unlocks a room, allowing others to join and re-enables transcripts 126 | 127 | **Response:** 128 | 129 | Status: 200 OK 130 | -------------------------------------------------------------------------------- /sections/search.md: -------------------------------------------------------------------------------- 1 | Search 2 | ====== 3 | 4 | Looks through transcripts on this accounts. 5 | 6 | For the full XML representation of messages, [check out the data reference](https://github.com/37signals/campfire-api/blob/master/sections/data_reference.md#message). 7 | 8 | 9 | Search for term 10 | --------------- 11 | 12 | * `GET /search/#{term}.xml` returns all the messages across all rooms on this account containing the supplied term. 13 | * `GET /search?q=#{term}&format=xml` same as above, but avoids issues with periods (".") in the term. 14 | 15 | **Response:** 16 | 17 | ``` xml 18 | 19 | 20 | 1 21 | Hello 22 | 1 23 | 2 24 | 2009-11-22T19:11:41Z 25 | TextMessage 26 | true 27 | 28 | ... 29 | 30 | ``` 31 | -------------------------------------------------------------------------------- /sections/streaming.md: -------------------------------------------------------------------------------- 1 | Streaming 2 | ========= 3 | 4 | The Streaming API allows you to monitor a room in real time. The authenticated user must already have joined the room in order to use this API. 5 | 6 | 7 | Connections 8 | ----------- 9 | 10 | Our servers will try to hold the streaming connections open indefinitely. However, API clients must be able to handle occasional timeouts or disruptions. Upon unexpected disconnection, API clients should wait for a few seconds before trying to reconnect. 11 | 12 | 13 | Authentication 14 | -------------- 15 | 16 | Authentication is done with a token, which you'll find on the "My Info" screen in Campfire. The streaming API doesn't support OAuth. 17 | 18 | Formats 19 | ------- 20 | 21 | The data stream is available in JSON or XML format. JSON is recommended. 22 | 23 | 24 | API 25 | --- 26 | 27 | * `GET https://streaming.campfirenow.com/room/#{id}/live.json` stream a single room’s messages. 28 | 29 | The target host is always `streaming.campfirenow.com`. 30 | 31 | **Response:** 32 | 33 | ``` json 34 | {"room_id":1,"created_at":"2009-12-01 23:44:40","body":"hello","id":1, 35 | "user_id":1,"type":"TextMessage","starred":"true"} 36 | {"room_id":1,"created_at":"2009-12-01 23:40:00","body":null,"id":2, 37 | "user_id":null,"type":"TimestampMessage","starred":"false"} 38 | ... 39 | ``` 40 | 41 | 42 | Examples 43 | -------- 44 | 45 | Need to get started quickly with the Campfire Streaming API? Try one of our example scripts that use the [twitter-stream](https://github.com/voloko/twitter-stream) library or [YAJL Ruby C bindings](https://github.com/brianmario/yajl-ruby): 46 | 47 | **twitter-stream** 48 | 49 | ``` ruby 50 | # gem install twitter-stream 51 | require 'twitter/json_stream' 52 | 53 | token = 'xxx' # your API token 54 | room_id = 111 # the ID of the room you want to stream 55 | 56 | options = { 57 | :path => "/room/#{room_id}/live.json", 58 | :host => 'streaming.campfirenow.com', 59 | :auth => "#{token}:x" 60 | } 61 | 62 | EventMachine::run do 63 | stream = Twitter::JSONStream.connect(options) 64 | 65 | stream.each_item do |item| 66 | puts item 67 | end 68 | 69 | stream.on_error do |message| 70 | puts "ERROR:#{message.inspect}" 71 | end 72 | 73 | stream.on_max_reconnects do |timeout, retries| 74 | puts "Tried #{retries} times to connect." 75 | exit 76 | end 77 | end 78 | ``` 79 | 80 | **YAJL** 81 | 82 | ``` ruby 83 | # gem install yajl-ruby 84 | 85 | require "uri" 86 | require "yajl/http_stream" 87 | 88 | token = 'xxx' # your API token 89 | room_id = 111 # the ID of the room you want to stream 90 | 91 | url = URI.parse("https://#{token}:x@streaming.campfirenow.com/room/#{room_id}/live.json") 92 | Yajl::HttpStream.get(url) do |message| 93 | puts message.inspect 94 | end 95 | ``` 96 | -------------------------------------------------------------------------------- /sections/transcripts.md: -------------------------------------------------------------------------------- 1 | Transcripts 2 | =========== 3 | 4 | The Transcripts API lets you fetch all the messages for a specific day. 5 | 6 | For the full XML representation of messages, [check out the data reference](https://github.com/37signals/campfire-api/blob/master/sections/data_reference.md#message). 7 | 8 | 9 | Get messages for today 10 | ---------------------- 11 | 12 | * `GET /room/#{id}/transcript.xml` returns all the messages sent today to a room. 13 | 14 | **Response:** 15 | 16 | ``` xml 17 | 18 | 19 | 1 20 | Hello 21 | 1 22 | 2 23 | 2009-11-22T19:11:41Z 24 | TextMessage 25 | false 26 | 27 | ... 28 | 29 | ``` 30 | 31 | 32 | Get messages for a specific date 33 | -------------------------------- 34 | 35 | * `GET /room/#{id}/transcript/#{year}/#{month}/#{day}.xml` returns all the messages sent on a specific date to a room. 36 | 37 | **Response:** 38 | 39 | ``` xml 40 | 41 | 42 | 1 43 | Hello 44 | 1 45 | 2 46 | 2009-11-22T19:11:41Z 47 | TextMessage 48 | false 49 | 50 | ... 51 | 52 | ``` 53 | -------------------------------------------------------------------------------- /sections/uploads.md: -------------------------------------------------------------------------------- 1 | Uploads 2 | ======= 3 | 4 | 5 | Create upload 6 | ------------- 7 | 8 | * `POST /room/#{id}/uploads.xml` uploads a file to the room. 9 | 10 | POST a multipart/form-data request body (RFC 2388). The file parameter must be named `upload`. 11 | 12 | **Example with curl:** 13 | 14 | curl -u TOKEN:X --form upload=@/path/to/file https://subdomain.campfirenow.com/room/1/uploads.xml 15 | 16 | **Request:** 17 | 18 | Content-Type: multipart/form-data; boundary=---------------------------XXX 19 | 20 | Content-Length: 8922 21 | 22 | -----------------------------XXX 23 | Content-Disposition: form-data; name="upload"; filename="me.jpg" 24 | Content-Type: image/jpeg 25 | ... 26 | 27 | **Response:** 28 | 29 | Status: 201 Created 30 | 31 | ``` xml 32 | 33 | 8922 34 | image/jpeg 35 | 2009-11-20T23:26:51Z 36 | 1 37 | me.jpg 38 | 1 39 | 1 40 | https://account.campfirenow.com/room/1/uploads/1/me.jpg 41 | 42 | ``` 43 | 44 | Get uploads 45 | ----------- 46 | 47 | * `GET /room/#{id}/uploads.xml` returns a collection of upto 5 recently uploaded files in the room. 48 | 49 | **Response:** 50 | 51 | ``` xml 52 | 53 | 54 | 135 55 | application/octet-stream 56 | 2009-11-20T23:26:51Z 57 | 1 58 | char.rb 59 | 1 60 | 1 61 | https://account.campfirenow.com/room/1/uploads/4/char.rb 62 | 63 | ... 64 | 65 | ``` 66 | 67 | 68 | Get upload 69 | ---------- 70 | 71 | * `GET /room/#{id}/messages/#{upload_message_id}/upload.xml` returns the upload object related to the supplied upload message id. 72 | 73 | **Response:** 74 | 75 | ``` xml 76 | 77 | 135 78 | application/octet-stream 79 | 2009-11-20T23:26:51Z 80 | 1 81 | char.rb 82 | 1 83 | 1 84 | https://account.campfirenow.com/room/1/uploads/4/char.rb 85 | 86 | ``` 87 | -------------------------------------------------------------------------------- /sections/users.md: -------------------------------------------------------------------------------- 1 | Users 2 | ===== 3 | 4 | Get user 5 | -------- 6 | 7 | * `GET /users/#{id}.xml` returns an existing user. 8 | 9 | **Response:** 10 | 11 | ``` xml 12 | 13 | 1 14 | Jason Fried 15 | jason@37signals.com 16 | true 17 | 2009-11-20T16:41:39Z 18 | Member 19 | https://asset0.37img.com/global/.../avatar.png 20 | 21 | ``` 22 | 23 | Get self 24 | -------- 25 | 26 | * `GET /users/me.xml` returns the user making the API request. 27 | 28 | This end-point may be requested using the username and password, rather than the API token. This makes it easier for applications to obtain the typically-obscure API token on mobile platforms, where it is inconvenient to have to key in all 40 characters of the token. 29 | 30 | **Response:** 31 | 32 | ``` xml 33 | 34 | 1 35 | Jason Fried 36 | jason@37signals.com 37 | true 38 | 2009-11-20T16:41:39Z 39 | Member 40 | https://asset0.37img.com/global/.../avatar.png 41 | 42 | ``` 43 | --------------------------------------------------------------------------------