# Path: wham/fields.py
# class WhamCharField(WhamFieldMixin, models.TextField):
# 
#     @property
#     def type_repr(self):
#         return 'char'
# 
# class WhamManyToManyField(models.ManyToManyField):
# 
#     def __init__(self, *args, **kwargs):
#         self.wham_result_path = kwargs.pop('wham_result_path', None)
#         self.wham_endpoint = kwargs.pop('wham_endpoint', None)
#         self.wham_results_path = kwargs.pop('wham_results_path', ())
#         self.wham_pk_param = kwargs.pop('wham_pk_param', None)
#         self.wham_params = kwargs.pop('wham_params', {})
#         return super(WhamManyToManyField, self).__init__(*args, **kwargs)
# 
# 
# 
# 
#     @property
#     def type_repr(self):
#         return 'many to many'
# 
# class WhamTextField(WhamFieldMixin, models.TextField):
# 
#     @property
#     def type_repr(self):
#         return 'text'
# 
# Path: wham/models.py
# class WhamModel(models.Model):
# 
#     objects = WhamManager()
# 
#     class Meta():
#         abstract = True


from django.db import models
from wham.fields import WhamCharField, WhamManyToManyField, WhamTextField
from wham.models import WhamModel
    api_key_settings_name = 'LASTFM_API_KEY'
    api_params = {
        'format': 'json',
        'limit': 500,
    }

# class LastFmTrack(WhamModel):
#
#     objects = WhamManager()
#
#     id = WhamCharField(max_length=255, primary_key=True)
#     name = WhamTextField()
#     listeners = WhamIntegerField()
#     playcount = WhamIntegerField()
#     duration = WhamIntegerField()
#
#     class Meta:
#         db_table = 'lastfm_track'
#
#     class WhamMeta(LastFmMeta):
#         endpoint = ''
#         params = {'method': 'track.getInfo'}
#
#     def __unicode__(self):
#         return self.name

class LastFmUser(WhamModel):

    name = WhamCharField(max_length=255, primary_key=True)


# Path: wham/fields.py
# class WhamCharField(WhamFieldMixin, models.TextField):
# 
#     @property
#     def type_repr(self):
#         return 'char'
# 
# class WhamManyToManyField(models.ManyToManyField):
# 
#     def __init__(self, *args, **kwargs):
#         self.wham_result_path = kwargs.pop('wham_result_path', None)
#         self.wham_endpoint = kwargs.pop('wham_endpoint', None)
#         self.wham_results_path = kwargs.pop('wham_results_path', ())
#         self.wham_pk_param = kwargs.pop('wham_pk_param', None)
#         self.wham_params = kwargs.pop('wham_params', {})
#         return super(WhamManyToManyField, self).__init__(*args, **kwargs)
# 
# 
# 
# 
#     @property
#     def type_repr(self):
#         return 'many to many'
# 
# class WhamTextField(WhamFieldMixin, models.TextField):
# 
#     @property
#     def type_repr(self):
#         return 'text'
# 
# Path: wham/models.py
# class WhamModel(models.Model):
# 
#     objects = WhamManager()
# 
#     class Meta():
#         abstract = True


# Path: wham/apis/lastfm/models.py
from django.db import models
from wham.fields import WhamCharField, WhamManyToManyField, WhamTextField
from wham.models import WhamModel

    api_key_settings_name = 'LASTFM_API_KEY'
    api_params = {
        'format': 'json',
        'limit': 500,
    }

# class LastFmTrack(WhamModel):
#
#     objects = WhamManager()
#
#     id = WhamCharField(max_length=255, primary_key=True)
#     name = WhamTextField()
#     listeners = WhamIntegerField()
#     playcount = WhamIntegerField()
#     duration = WhamIntegerField()
#
#     class Meta:
#         db_table = 'lastfm_track'
#
#     class WhamMeta(LastFmMeta):
#         endpoint = ''
#         params = {'method': 'track.getInfo'}
#
#     def __unicode__(self):
#         return self.name

class LastFmUser(WhamModel):

    name = WhamCharField(max_length=255, primary_key=True)


    top_artists = WhamManyToManyField(