# Path: mineid/api/views.py
# def user(request):
#     access_token = _get_access_token(request)
#     base_url = 'http://%s' % request.get_host()
#     data = access_token.user.get_api_dict(base_url)
#     return HttpResponse(json.dumps(data), content_type='application/json')
# 
# def minecraft_accounts(request):
#     access_token = _get_access_token(request)
#     base_url = 'http://%s' % request.get_host()
#     minecraft_accounts = access_token.user.minecraft_accounts.all()
#     data = [account.get_api_dict(base_url) for account in minecraft_accounts]
#     return HttpResponse(json.dumps(data), content_type='application/json')


from django.conf.urls import patterns, include, url
from .views import user, minecraft_accounts


urlpatterns = patterns(
    '',
    url(r'^user$', user, name='user'),
    url(r'^minecraft_accounts$', minecraft_accounts,

# Path: mineid/api/views.py
# def user(request):
#     access_token = _get_access_token(request)
#     base_url = 'http://%s' % request.get_host()
#     data = access_token.user.get_api_dict(base_url)
#     return HttpResponse(json.dumps(data), content_type='application/json')
# 
# def minecraft_accounts(request):
#     access_token = _get_access_token(request)
#     base_url = 'http://%s' % request.get_host()
#     minecraft_accounts = access_token.user.minecraft_accounts.all()
#     data = [account.get_api_dict(base_url) for account in minecraft_accounts]
#     return HttpResponse(json.dumps(data), content_type='application/json')


# Path: mineid/api/urls.py
from django.conf.urls import patterns, include, url
from .views import user, minecraft_accounts



urlpatterns = patterns(
    '',
    url(r'^user$', user, name='user'),
    url(r'^minecraft_accounts$', minecraft_accounts,

        name='minecraft_accounts'),