Skip to content

Commit

Permalink
Add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lognaturel committed Feb 17, 2023
1 parent 146deb0 commit 996c301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/http-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ client.get("projects/8")
client.post("projects/7/app-users", json={"displayName": "Lab Tech"})
```

These methods provide convenient access to `Client.session`, which is a [`requests.Session`](https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) object subclass. The `Session` has customised to prefix request URLs with the `base_url` from the pyodk config. For example with a base_url `https://www.example.com`, a call to `client.session.get("projects/8")` gets the details of `project_id=8`, using the full url `https://www.example.com/v1/projects/8`.
These methods provide convenient access to `Client.session`, which is a [`requests.Session`](https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) object subclass. The `Session` has customised to prefix request URLs with the `base_url` from the pyodk config. For example with a base_url `https://www.example.com`, a call to `client.session.get("projects/8")` gets the details of `project_id=8`, using the full url `https://www.example.com/v1/projects/8`.

Learn more in [this example](/examples/beyond-library-methods/).
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ nav:
- 'submissions.md'
- 'projects.md'
- 'http-methods.md'
- 'examples/README.md'

theme:
name: material
Expand All @@ -31,6 +32,7 @@ plugins:
docstring_style: sphinx
members_order: "source"
show_root_toc_entry: False
- mkdocs-jupyter

markdown_extensions:
- pymdownx.highlight:
Expand Down

0 comments on commit 996c301

Please # to comment.