# Path: twobuntu/api/v1_2/views.py
# def index(request):
#     def __init__(self, request, **kwargs):
#     def default(self, o):
#     def _encode_article(self, article):
#     def _encode_category(self, category):
#     def _encode_profile(self, profile):
# def endpoint(fn):
#     def wrap(request, **kwargs):
# def paginate(fn):
#     def wrap(request, **kwargs):
# def minmax(field):
#     def outer(fn):
#         def inner(request, **kwargs):
# def articles(request):
# def article_by_id(request, id):
# def authors(request):
# def author_by_id(request, id):
# def articles_by_author(request, id):
# def categories(request):
# def articles_by_category(request, id):
# class APIException(Exception):
# class ObjectEncoder(JSONEncoder):


from django.conf.urls import url
from twobuntu.api.v1_2 import views



urlpatterns = [
    url(r'^articles/$', views.articles, name='articles'),
    url(r'^articles/(?P<id>\d+)/$', views.article_by_id, name='article_by_id'),

    url(r'^authors/$', views.authors, name='authors'),
    url(r'^authors/(?P<id>\d+)/$', views.author_by_id, name='author_by_id'),

# Path: twobuntu/api/v1_2/views.py
# def index(request):
#     def __init__(self, request, **kwargs):
#     def default(self, o):
#     def _encode_article(self, article):
#     def _encode_category(self, category):
#     def _encode_profile(self, profile):
# def endpoint(fn):
#     def wrap(request, **kwargs):
# def paginate(fn):
#     def wrap(request, **kwargs):
# def minmax(field):
#     def outer(fn):
#         def inner(request, **kwargs):
# def articles(request):
# def article_by_id(request, id):
# def authors(request):
# def author_by_id(request, id):
# def articles_by_author(request, id):
# def categories(request):
# def articles_by_category(request, id):
# class APIException(Exception):
# class ObjectEncoder(JSONEncoder):


# Path: twobuntu/api/v1_2/urls.py
from django.conf.urls import url
from twobuntu.api.v1_2 import views




urlpatterns = [
    url(r'^articles/$', views.articles, name='articles'),
    url(r'^articles/(?P<id>\d+)/$', views.article_by_id, name='article_by_id'),

    url(r'^authors/$', views.authors, name='authors'),
    url(r'^authors/(?P<id>\d+)/$', views.author_by_id, name='author_by_id'),

    url(r'^authors/(?P<id>\d+)/articles/$', views.articles_by_author, name='articles_by_author'),