소스 검색

Fix examples in README

tags/v1.1^0
Matt Baer 5 년 전
부모
커밋
cf3c150ac9
1개의 변경된 파일11개의 추가작업 그리고 7개의 파일을 삭제
  1. +11
    -7
      README.md

+ 11
- 7
README.md 파일 보기

@@ -24,7 +24,7 @@ func main() {
c := writeas.NewClient()

// Publish a post
p, err := c.CreatePost(&PostParams{
p, err := c.CreatePost(&writeas.PostParams{
Title: "Title!",
Content: "This is a post.",
Font: "sans",
@@ -37,9 +37,11 @@ func main() {
token := p.Token

// Update a published post
p, err = c.UpdatePost(&PostParams{
ID: p.ID,
Token: token,
p, err = c.UpdatePost(&writeas.PostParams{
OwnedPostParams: writeas.OwnedPostParams{
ID: p.ID,
Token: token,
},
Content: "Now it's been updated!",
})
if err != nil {
@@ -53,9 +55,11 @@ func main() {
}

// Delete a post
err = c.DeletePost(&PostParams{
ID: p.ID,
Token: token,
err = c.DeletePost(&writeas.PostParams{
OwnedPostParams: writeas.OwnedPostParams{
ID: p.ID,
Token: token,
},
})
}
```


불러오는 중...
취소
저장