-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
# Komoot PHP | ||
NOTICE: Komoot has decided to add an invisible captcha to their login process. This renders this library unusable. I have sent them an email asking if we can get an alternative way to log in, but I have yet to receive a response. | ||
|
||
This is a PHP library that can be used to interact with Komoot. It uses the same API the Komoot website uses. It is not officially supported by Komoot to integrate it in third party projects. I just needed a fancy way of interacting with Komoot for a personal project. That is why I created this package. | ||
|
||
## Usage | ||
|
||
### Authentication | ||
|
||
You will need to use your Komoot account email address and password to log in. | ||
You will need to use your Komoot account email address, userid and password to log in. | ||
```php | ||
use Woeler\KomootPhp\Api\Komoot; | ||
|
||
// Create the api object | ||
$api = new Komoot('[email protected]', 'my-komoot-password'); | ||
|
||
// Execute the login | ||
$api->login(); | ||
$api = new Komoot('[email protected]', 'my-komoot-password', 1234); // Replace 1234 with your userid | ||
|
||
// ... You can now start making api calls | ||
``` | ||
|
@@ -46,3 +41,11 @@ If you have an endpoint that you wish to call, but it does not have a dedicated | |
```php | ||
$api->customRequest('https://api.komoot.de/v007/some-other-endpoint', [], 'GET'); | ||
``` | ||
|
||
## Upgrading v1.x to v2.x | ||
|
||
- Removed the `login()` method. It is no longer needed. | ||
- The `Komoot` constructor now takes the userid as the third argument, this is required | ||
- Removed the `setCookieJar()` method. It is no longer needed. | ||
- Removed the `getCookieJar()` method. It is no longer needed. | ||
- Removed the `setUserId()` method. It is no longer needed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters