avt_checktwfriends Django RESTful API project was published on GitHub

avt_checktwfriends Django RESTful API project

1. Introduction Active Twitter users who have many friends(following) often find it difficult to identify those who are no longer their followers. However, users who are no longer followers continue to be friends(following). Maintain the actual state of the list of your friends on Twitter with the

avt_checktwfriends Django RESTful API project simply:

Check your friends(following) on Twitter who are not followers

Mark those friends(following) with whom you wish to keep friendship

Destroy friendship(unfollow) with all the other friends(following)

avt_checktwfriends is a CRUD-based RESTful API project with Django and Django REST Framework. The avt_checktwfriends project was published on GitHub under the MIT license.

2. Requirements

2.1 avt_checktwfriends project requires the following main components:

Python 3.6.3 – Python is a programming language that lets you work quickly

3.4.3 To successfully run unit tests for views: You need specify the screen names of REAL Twitter users as follow:

# avt_checktwfrinds/api/tests/test_views.py
class NotFollowersTwFriendsNeedUnfollowUpdateTestCase(APITestCase):
"""
Test the API which update need_unfollow status for not_follower_tw_friend
from 'not_unfollow_tw_friends_screen_name_list' with 'need_unfollow=False'
(all the existing Twitter friends who aren't followers and not selected for unfollow)
"""
# A test list that contains 'screen_names' of all the existing Twitter friends
# who aren't followers and not selected for unfollow.
# NOTE: To successfully run the test, you need specify
# the screen names of REAL Twitter users.
not_unfollow_tw_friends_screen_name_list = [
'<real_tw_user_screen_name_1 from your account>',
'<real_tw_user_screen_name_2 from your account>',
'<real_tw_user_screen_name_3 from your account>',
'<...>',
'<real_tw_user_screen_name_N from your account>'
]

Run the unit test with the following console command:

$ python manage.py test api.tests.test_views

3.5 Apply the migrations

$ python manage.py makemigrations api

By running makemigrations, you’re telling Django that you’ve made some changes to your models (in this case, you’ve made new ones) and that you’d like the changes to be stored as a migration. – Django 1.11 documentation$ python manage.py migrate
Run migrate to apply changes from models to the database. – Django 1.11 documentation

3.6 Create a superuser who will have permissions to the our API endpoints

$ python manage.py createsuperuser

3.7 Start the development server

$ python manage.py runserver

4. Examples of using our API Ways to access the API of our project:

Directly through the browser (The Web browsable API from Django REST Framework)