from django.conf.urls import patterns, url
from rest_framework.urlpatterns import format_suffix_patterns

urlpatterns = patterns(
    'media.views',
    url(r'^(?P<uuid>[\w\-]*)_(?P<width>[\d]*)x(?P<height>[\d]*)\.' +
        '(?P<format_type>[\w]{3,4})$', 'show_image'),
    url(r'^(?P<repository>\w+)/(?P<mucua>[a-zA-Z0-9\-]+)/media/last/' +
        '(?P<qtd>[\d]*)$', 'media_last'),
    url(r'^(?P<repository>\w+)/(?P<mucua>[a-zA-Z0-9\-]+)/media/last',
        'media_last'),
    url(r'^(?P<repository>\w+)/(?P<mucua>rede)/bbx/search/' +
        '(?P<args>[\w\/-_]*)$', 'media_list'),
    url(r'^(?P<repository>\w+)/(?P<mucua>[a-zA-Z0-9\-]+)/bbx/search/' +
        '(?P<args>[\w\/-_]*)$', 'media_list'),
    url(r'^(?P<repository>\w+)/(?P<mucua>[a-zA-Z0-9\-]+)/media/' +
        '(?P<pk>[\w\-]*)$', 'media_detail'),
    url(r'^medias/(?P<pk>[0-9]+)/$', 'media_detail'),
)
urlpatterns = format_suffix_patterns(urlpatterns)
