Code Monkey home page Code Monkey logo

komoot-php's Introduction

Komoot PHP

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.

use Woeler\KomootPhp\Api\Komoot;

// Create the api object
$api = new Komoot('[email protected]', 'my-komoot-password');

// Execute the login
$api->login();

// ... You can now start making api calls

Api calls

The endpoints I deemed important have dedicated methods. After logging in, you can simply use them.

// Get a single tour
$api->getTour(123);

// Get a single tour as GPX data
$api->getTourGpx(123);

// Get all tours of your account
$api->getAllTours();

// Get a single user
$api->getUser(123);

// Get a single collection
$api->getCollection(123);

You may have a look in the Komoot class, various other endpoints are also available.

If you have an endpoint that you wish to call, but it does not have a dedicated method, you can use the customRequest method.

$api->customRequest('https://api.komoot.de/v007/some-other-endpoint', [], 'GET');

komoot-php's People

Contributors

woeler avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.