|
1 | 1 | # MapRoulette - A Python Client for the MapRoulette API |
2 | 2 |
|
| 3 | +https://maproulette-python-client.readthedocs.io/ |
| 4 | + |
3 | 5 | This client makes it easy for users to communicate with the MapRoulette API from within |
4 | 6 | their Python environment. In the example below, we are able to access a MapRoulette project in just four lines of code: |
5 | 7 |
|
6 | 8 | ``` |
7 | 9 | >>> import maproulette |
8 | 10 | >>> config = maproulette.Configuration() |
9 | | - >>> api = maproulette.Api(config) |
| 11 | + >>> api = maproulette.Project(config) |
10 | 12 | >>> api.get_project_by_id(4719) |
11 | 13 | {'data': {'id': 4719, 'owner': 4785024, 'name': 'health_facilities_in_india',...} |
12 | 14 | ``` |
@@ -35,15 +37,16 @@ that when you create your configuration. For example: |
35 | 37 | config = maproulette.Configuration(api_key='{YOUR_API_KEY}') |
36 | 38 | ``` |
37 | 39 |
|
38 | | -Once you have your configuration object, we can create our API object. This gives us access to all of the functionality |
39 | | -in the MapRoulette package. |
| 40 | +Once you have your configuration object we can create an API object using one of several modules depending on the |
| 41 | +functionality that the user is looking for. For example, creating a Project object allows the user to interact with all |
| 42 | +of the project-related functionality in the MapRoulette package. |
40 | 43 |
|
41 | 44 | ``` |
42 | | -api = maproulette.Api(config) |
| 45 | +api = maproulette.Project(config) |
43 | 46 | ``` |
44 | 47 |
|
45 | | -Now we have access to the MapRoulette API methods. In the example below, I want to find a project by name using a search |
46 | | -string: |
| 48 | +Now we have access to the MapRoulette Project API methods. In the example below, I want to find a project by name using |
| 49 | +a search string: |
47 | 50 |
|
48 | 51 | ``` |
49 | 52 | # We want to fetch a project with name 'Health Facilities in India' |
|
0 commit comments