Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ output/*/index.html
docs/_build

*venv*

# IDEs
.idea
.code
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add the line break. The rest is fine with me.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ swapi-python
:target: https://pypi.python.org/pypi/swapi


A Python helper library for swapi.co - the Star Wars API
A Python helper library for swapi.dev - the Star Wars API

NOTE: Tests will run against hosted API as opposed to data from github repo

Expand Down Expand Up @@ -42,7 +42,7 @@ All resources are accessible through the top-level ``get_resource()`` methods::
Methods
=======

These are the top-level methods you can use to get resources from swapi.co. To learn more about the models and objects that are returned, see the ``models`` page.
These are the top-level methods you can use to get resources from swapi.dev. To learn more about the models and objects that are returned, see the ``models`` page.

get_person(id)
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ A novelty method that prints out each line of the opening crawl with a 0.5 secon
Multiple Collection Model
=========================

When you query swapi.co for multiple resources of the same type, they will be returned as a ``ResourceQuerySet``, which is a collection of those resources that you requested. For example, to get the ``Starship`` resources linked to a person, you can do the following::
When you query swapi.dev for multiple resources of the same type, they will be returned as a ``ResourceQuerySet``, which is a collection of those resources that you requested. For example, to get the ``Starship`` resources linked to a person, you can do the following::

luke = swapi.get_person(1)
starships = luke.get_starships()
Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

requirements = [
'requests==2.5.0', 'six==1.8.0', 'ujson==1.33'
]
requirements = ['requests', 'six', 'ujson']
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this generate a conflict in the future if the libraries were updated?


setup(
name='swapi',
version='0.1.3',
description='A Python helper library for swapi.co - the Star Wars API',
version='0.2.0',
description='A Python helper library for swapi.dev - the Star Wars API',
long_description=readme + '\n\n' + history,
author='Paul Hallett',
author_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion swapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if DEBUG:
BASE_URL = 'http://localhost:8000/api'
else:
BASE_URL = 'http://swapi.co/api'
BASE_URL = 'http://swapi.dev/api'

PEOPLE = 'people'
PLANETS = 'planets'
Expand Down