Pārlūkot izejas kodu

Update developer.write.as -> developers.write.as

pull/19/head
Matt Baer pirms 4 gadiem
vecāks
revīzija
b35223f930
5 mainītis faili ar 11 papildinājumiem un 11 dzēšanām
  1. +1
    -1
      .github/ISSUE_TEMPLATE.md
  2. +1
    -1
      README.md
  3. +1
    -1
      auth.go
  4. +3
    -3
      collection.go
  5. +5
    -5
      post.go

+ 1
- 1
.github/ISSUE_TEMPLATE.md Parādīt failu

@@ -4,4 +4,4 @@
## Implementation


[API documentation](https://developer.write.as/docs/api/?go#TODO-ENTER-SECTION-HERE).
[API documentation](https://developers.write.as/docs/api/?go#TODO-ENTER-SECTION-HERE).

+ 1
- 1
README.md Parādīt failu

@@ -16,7 +16,7 @@ go get go.code.as/writeas.v2

## Documentation

See all functionality and usages in the [API documentation](https://developer.write.as/docs/api/).
See all functionality and usages in the [API documentation](https://developers.write.as/docs/api/).

### Example usage



+ 1
- 1
auth.go Parādīt failu

@@ -6,7 +6,7 @@ import (
)

// LogIn authenticates a user with Write.as.
// See https://developer.write.as/docs/api/#authenticate-a-user
// See https://developers.write.as/docs/api/#authenticate-a-user
func (c *Client) LogIn(username, pass string) (*AuthUser, error) {
u := &AuthUser{}
up := struct {


+ 3
- 3
collection.go Parādīt failu

@@ -34,7 +34,7 @@ type (

// CreateCollection creates a new collection, returning a user-friendly error
// if one comes up. Requires a Write.as subscription. See
// https://developer.write.as/docs/api/#create-a-collection
// https://developers.write.as/docs/api/#create-a-collection
func (c *Client) CreateCollection(sp *CollectionParams) (*Collection, error) {
p := &Collection{}
env, err := c.post("/collections", sp, p)
@@ -65,7 +65,7 @@ func (c *Client) CreateCollection(sp *CollectionParams) (*Collection, error) {

// GetCollection retrieves a collection, returning the Collection and any error
// (in user-friendly form) that occurs. See
// https://developer.write.as/docs/api/#retrieve-a-collection
// https://developers.write.as/docs/api/#retrieve-a-collection
func (c *Client) GetCollection(alias string) (*Collection, error) {
coll := &Collection{}
env, err := c.get(fmt.Sprintf("/collections/%s", alias), coll)
@@ -90,7 +90,7 @@ func (c *Client) GetCollection(alias string) (*Collection, error) {

// GetCollectionPosts retrieves a collection's posts, returning the Posts
// and any error (in user-friendly form) that occurs. See
// https://developer.write.as/docs/api/#retrieve-collection-posts
// https://developers.write.as/docs/api/#retrieve-collection-posts
func (c *Client) GetCollectionPosts(alias string) (*[]Post, error) {
coll := &Collection{}
env, err := c.get(fmt.Sprintf("/collections/%s/posts", alias), coll)


+ 5
- 5
post.go Parādīt failu

@@ -84,7 +84,7 @@ type (

// GetPost retrieves a published post, returning the Post and any error (in
// user-friendly form) that occurs. See
// https://developer.write.as/docs/api/#retrieve-a-post.
// https://developers.write.as/docs/api/#retrieve-a-post.
func (c *Client) GetPost(id string) (*Post, error) {
p := &Post{}
env, err := c.get(fmt.Sprintf("/posts/%s", id), p)
@@ -109,7 +109,7 @@ func (c *Client) GetPost(id string) (*Post, error) {
}

// CreatePost publishes a new post, returning a user-friendly error if one comes
// up. See https://developer.write.as/docs/api/#publish-a-post.
// up. See https://developers.write.as/docs/api/#publish-a-post.
func (c *Client) CreatePost(sp *PostParams) (*Post, error) {
p := &Post{}
endPre := ""
@@ -137,7 +137,7 @@ func (c *Client) CreatePost(sp *PostParams) (*Post, error) {
}

// UpdatePost updates a published post with the given PostParams. See
// https://developer.write.as/docs/api/#update-a-post.
// https://developers.write.as/docs/api/#update-a-post.
func (c *Client) UpdatePost(id, token string, sp *PostParams) (*Post, error) {
return c.updatePost("", id, token, sp)
}
@@ -176,7 +176,7 @@ func (c *Client) updatePost(collection, identifier, token string, sp *PostParams
}

// DeletePost permanently deletes a published post. See
// https://developer.write.as/docs/api/#delete-a-post.
// https://developers.write.as/docs/api/#delete-a-post.
func (c *Client) DeletePost(id, token string) error {
return c.deletePost("", id, token)
}
@@ -209,7 +209,7 @@ func (c *Client) deletePost(collection, identifier, token string) error {
}

// ClaimPosts associates anonymous posts with a user / account.
// https://developer.write.as/docs/api/#claim-posts.
// https://developers.write.as/docs/api/#claim-posts.
func (c *Client) ClaimPosts(sp *[]OwnedPostParams) (*[]ClaimPostResult, error) {
p := &[]ClaimPostResult{}
env, err := c.post("/posts/claim", sp, p)


Notiek ielāde…
Atcelt
Saglabāt