Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
Fix bad parameter
Fix wrong function call (api instead of mapper)
  • Loading branch information
Anthony Ruhier authored and aruhier committed Mar 27, 2017
1 parent 9c145d0 commit 4444da0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Initialize a new `NetboxAPI` object:

```python
netbox_api = NetboxAPI(
url="netbox.example.com", login="login", password="password"
url="netbox.example.com", username="user", password="password"
)
```

Expand Down Expand Up @@ -52,15 +52,15 @@ Initialize a new `NetboxMapper` object:

```python
netbox_api = NetboxAPI(
url="netbox.example.com", login="login", password="password"
url="netbox.example.com", username="user", password="password"
)
netbox_mapper = NetboxMapper(netbox_api, app_name="dcim", model="sites")
```

Then get all objects of the model:

```python
>>> sites = list(netbox_api.get())
>>> sites = list(netbox_mapper.get())
[<NetboxMapper>, <NetboxMapper>, …]

>>> print(sites[0].id)
Expand All @@ -72,7 +72,7 @@ Then get all objects of the model:
Or get a specific site by its id:

```python
>>> netbox_api.get(1)
>>> netbox_mapper.get(1)
```


Expand Down

0 comments on commit 4444da0

Please sign in to comment.