Add README

still a lot to do
This commit is contained in:
2024-02-06 15:59:03 +01:00
parent 550fa9105d
commit fea5ba866d
+52
View File
@@ -0,0 +1,52 @@
# Active Collab API
> Note: I have tested this API against the Cloud-Hosted version of [Active-Collab](https://activecollab.com/), not with the self-hosted installation!
## Useful links
* https://developers.activecollab.com/api-documentation/index.html
* https://github.com/activecollab/activecollab-feather-sdk
* https://stackoverflow.com/questions/tagged/activecollab
## Workflow
1. Login with username and password to Authentication Server and get back the `intent` for the user
2. Request a token for an Account using the Account `url` and the users `intent`
3. Use the token to authenticate for every other API-Call
Example login:
```python
auth = ACAuthenticator()
session = auth.login(username, password)
pprint(session)
user = session['user']
# use first account
account = auth.find_account(account_name)
```
Example request token
```python
token = ACTokenAuthenticator(account, user).issue_token_intent()
pprint(token)
```
Example client request
```python
ac = ACClient(account, token)
res = ac.get_projects()
pprint(res.json())
```
## Configuration
config.ini:
```ini
[LOGIN]
username = you@example.com
password = very-secret
account_name = "#123456"
```