https://github.com/correlaid/c11-notion-api-r
https://github.com/correlaid/c11-notion-api-r
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/correlaid/c11-notion-api-r
- Owner: CorrelAid
- License: mit
- Created: 2022-09-10T07:09:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-11T07:51:54.000Z (almost 4 years ago)
- Last Synced: 2023-07-14T12:27:31.752Z (almost 3 years ago)
- Language: R
- Size: 20.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Track 3 | Challenge: Notion Wrapper for R
================
# Setup
## Dependencies
install `renv`:
```
install.packages("renv")
```
### Install/update dependencies
```
renv::restore()
```
### Adding new dependencies
1. install package as usual (with `install.packages`)
2. run `renv::snapshot()`
3. commit and push the updated `renv.lock`
## Notion
First of all, you also need a Notion workspace and have to be the admin of it. Therefore, just create a Notion account and a workspace [here](notion.so/). Having done that, you can create an access token via creating an integration [here](https://www.notion.com/my-integrations). You can find a very detailed information on how to get started with Notion integrations [here](https://developers.notion.com/docs/getting-started) as well.
# Current functions/implementation
- `get_api_path()`: pass a notion url to the function to get the url path which has to be passed to query the API
- `NotionClient`: object-oriented approach to set up a Notion client to get the content and information from Notion for the url which was returned by get_api_path()
# TO DOs
- [ ] parse function for each data type
- [ ] pages
- [ ] blocks: headings etc.
- [ ] databases: does not work with the NotionClient yet
- [ ] check nesting options
- [ ] edge cases for get_api_path()
- [ ] plain text vs formatted text
- [ ] post requests to add content R -> Notion