# Path: yak/rest_social_auth/backends/base.py
# class ExtraDataAbstractMixin(object, metaclass=abc.ABCMeta):
#     """
#     Ensure that backends define these methods. Used in pipeline to save extra data on the user model.
#     """
# 
#     @abc.abstractmethod
#     def save_extra_data(response, user):
#         return
# 
#     @abc.abstractmethod
#     def get_profile_image(strategy, details, response, uid, user, social, is_new=False, *args, **kwargs):
#         return
# 
# class ExtraActionsAbstractMixin(object, metaclass=abc.ABCMeta):
# 
#     @abc.abstractmethod
#     def post(user_social_auth, social_obj):
#         return
# 
#     @abc.abstractmethod
#     def get_friends(user_social_auth):
#         return


import requests
from social_core.backends.soundcloud import SoundcloudOAuth2
from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin
        if response['description']:
            user.about = response['description']

        user.save()

    @staticmethod
    def get_profile_image(strategy, details, response, uid, user, social, is_new=False, *args, **kwargs):
        return response['avatar_url']

    @staticmethod
    def post(user_social_auth, social_obj):
        return

    @staticmethod
    def get_friends(user_social_auth):
        return

    @staticmethod
    def get_posts(user_social_auth, last_updated_time):
        formatted_time = last_updated_time.replace(microsecond=0) if last_updated_time else None
        params = {
            'oauth_token': user_social_auth.extra_data['access_token'],
            'created_at[from]': formatted_time,
            'filter': 'public'
        }
        try:
            track_url = "https://api.soundcloud.com/me/tracks.json"
            tracks = requests.get(track_url, params=params).json()

            favorite_track_url = "https://api.soundcloud.com/me/favorites.json"

# Path: yak/rest_social_auth/backends/base.py
# class ExtraDataAbstractMixin(object, metaclass=abc.ABCMeta):
#     """
#     Ensure that backends define these methods. Used in pipeline to save extra data on the user model.
#     """
# 
#     @abc.abstractmethod
#     def save_extra_data(response, user):
#         return
# 
#     @abc.abstractmethod
#     def get_profile_image(strategy, details, response, uid, user, social, is_new=False, *args, **kwargs):
#         return
# 
# class ExtraActionsAbstractMixin(object, metaclass=abc.ABCMeta):
# 
#     @abc.abstractmethod
#     def post(user_social_auth, social_obj):
#         return
# 
#     @abc.abstractmethod
#     def get_friends(user_social_auth):
#         return


# Path: yak/rest_social_auth/backends/yak_soundcloud.py
import requests
from social_core.backends.soundcloud import SoundcloudOAuth2
from yak.rest_social_auth.backends.base import ExtraDataAbstractMixin, ExtraActionsAbstractMixin

        if response['description']:
            user.about = response['description']

        user.save()

    @staticmethod
    def get_profile_image(strategy, details, response, uid, user, social, is_new=False, *args, **kwargs):
        return response['avatar_url']

    @staticmethod
    def post(user_social_auth, social_obj):
        return

    @staticmethod
    def get_friends(user_social_auth):
        return

    @staticmethod
    def get_posts(user_social_auth, last_updated_time):
        formatted_time = last_updated_time.replace(microsecond=0) if last_updated_time else None
        params = {
            'oauth_token': user_social_auth.extra_data['access_token'],
            'created_at[from]': formatted_time,
            'filter': 'public'
        }
        try:
            track_url = "https://api.soundcloud.com/me/tracks.json"
            tracks = requests.get(track_url, params=params).json()

            favorite_track_url = "https://api.soundcloud.com/me/favorites.json"

            favorite_tracks = requests.get(favorite_track_url, params=params).json()