This repository has been archived by the owner on Oct 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation and fix github url repo in package.json
- Loading branch information
1 parent
05d56d4
commit f374d13
Showing
4 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## 0.0.2 (2015-03-31) | ||
|
||
- Fix github's repo url on package.json | ||
- Added documentation for `api` resource | ||
|
||
## 0.0.1 (2015-03-30) | ||
|
||
First commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# API | ||
|
||
## api.test - Checks API calling code | ||
|
||
####Arguments: | ||
|
||
| Argument | Example | Required | Description | | ||
| -------- | ---------- | -------- | -------------------------- | | ||
| `error` | `my_error` | Optional | Error response to return | | ||
| `foo` | `bar` | Optional | Example property to return | | ||
|
||
####Example: | ||
|
||
CoffeeScript | ||
|
||
```coffeescript | ||
slack.api.api.test | ||
person: 'John Doe' | ||
, (err, res) -> | ||
throw err if err | ||
console.log res | ||
``` | ||
|
||
JavaScript | ||
|
||
```javascript | ||
slack.api.api.test({ | ||
person: 'John Doe' | ||
}, function (err, res) { | ||
if (err) { throw err; } | ||
console.log(res); | ||
}); | ||
``` | ||
|
||
####Response: | ||
|
||
```json | ||
{ | ||
"ok": true, | ||
"args": { | ||
"person": "John Doe" | ||
} | ||
} | ||
``` | ||
|
||
If called with an `error` argument an error response is returned: | ||
|
||
```json | ||
{ | ||
"ok": false, | ||
"error": "my_error", | ||
"args": { | ||
"error": "my_error" | ||
} | ||
} | ||
``` | ||
|
||
###Errors: | ||
|
||
This method has no expected error responses. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing. Callers should always check the value of the ok params in the response. | ||
|
||
=== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "slack-api-client", | ||
"description": "A Slack API Client", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "Germán Robledo <[email protected]>", | ||
"main": "./lib/slack.js", | ||
"dependencies": { | ||
|
@@ -30,6 +30,6 @@ | |
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/germanrcuriel/slack-client.git" | ||
"url": "git://github.com/germanrcuriel/slack-api-client.git" | ||
} | ||
} |