Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed "WebStatusCode" in the guides #419

Merged
merged 3 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/_guides/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Public Function GetProject(Id As Long) As Dictionary
' ...
' {"data":{"id":1,"name":"Project 1"}}

If Response.StatusCode = WebStatus.Ok Then
If Response.StatusCode = WebStatusCode.Ok Then
' json response is automatically parsed based Request.Format
Set GetProject = Response.Data("data")
End If
Expand All @@ -47,7 +47,7 @@ Public Function GetProject2(Id As Long) As Dictionary
Dim Response As WebResponse
Set Response = Client.GetJson("projects/" & Id)

If Response.StatusCode = WebStatus.Ok Then
If Response.StatusCode = WebStatusCode.Ok Then
Set GetProject2 = Response.Data("data")
End If
End Function
Expand Down
2 changes: 1 addition & 1 deletion docs/_guides/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Public Function GetProjects() As Collection
' ...
' {"data":[{"id":1,"name":"Project 1"},{"id":2,"name":"Project 2"}]}

If Response.StatusCode <> WebStatus.Ok Then
If Response.StatusCode <> WebStatusCode.Ok Then
Err.Raise Response.StatusCode, "GetProjects", Response.Content
Else
' Response is automatically converted to Dictionary/Collection by Request.Format
Expand Down
4 changes: 2 additions & 2 deletions docs/_guides/post.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ Public Function CreateProject(Project As Dictionary) As Long
' ...
' {"data":{"id":3,"name":"new Project"}}

If Response.StatusCode <> WebStatus.Created Then
If Response.StatusCode <> WebStatusCode.Created Then
Err.Raise Response.StatusCode, "CreateProject", _
"Failed to create project: " & Response.Content
Else
' Return id of created project
CreateProject = Response.Data("data")("id")
End If
End Sub
```
```