How to use the fortnitepy.http.AccountPublicService function in fortnitepy

To help you get started, we’ve selected a few fortnitepy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_get_by_email(self, email: str) -> dict:
        r = AccountPublicService(
            '/account/api/public/account/email/{email}',
            email=email
        )
        return await self.get(r, auth='LAUNCHER_ACCESS_TOKEN')
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_sessions_kill_token(self, token: str, auth=None) -> Any:
        r = AccountPublicService('/account/api/oauth/sessions/kill/{token}',
                                 token=token)
        return await self.delete(r, auth=auth)
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_get_by_user_id(self, user_id: str, *,
                                     auth: Optional[str] = None) -> dict:
        r = AccountPublicService(
            '/account/api/public/account/{user_id}',
            user_id=user_id
        )
        return await self.get(r, auth=auth)
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_get_exchange_data(self, auth: str) -> dict:
        r = AccountPublicService('/account/api/oauth/exchange')
        return await self.get(r, auth=auth)
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_generate_device_auth(self, client_id: str) -> dict:
        r = AccountPublicService(
            '/account/api/public/account/{client_id}/deviceAuth',
            client_id=client_id
        )
        return await self.post(r, auth="IOS_ACCESS_TOKEN", json={})
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_get_by_display_name(self, display_name: str) -> dict:
        r = AccountPublicService(
            '/account/api/public/account/displayName/{display_name}',
            display_name=display_name
        )
        return await self.get(r)
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_lookup_device_auth(self, client_id: str,
                                         device_id: str) -> dict:
        r = AccountPublicService(
            '/account/api/public/account/{client_id}/deviceAuth/{device_id}',
            client_id=client_id,
            device_id=device_id,
            auth="IOS_ACCESS_TOKEN"
        )
        return await self.get(r)
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_get_external_auths_by_id(self, user_id: str) -> list:
        r = AccountPublicService(
            '/account/api/public/account/{user_id}/externalAuths',
            user_id=user_id
        )
        return await self.get(r)
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_get_multiple_by_user_id(self,
                                              user_ids: List[str]) -> list:
        params = [('accountId', user_id) for user_id in user_ids]
        r = AccountPublicService('/account/api/public/account')
        return await self.get(r, params=params)
github Terbau / fortnitepy / fortnitepy / http.py View on Github external
async def account_sessions_kill(self, kill_type: str,
                                    auth='IOS_ACCESS_TOKEN') -> Any:
        params = {
            'killType': kill_type
        }

        r = AccountPublicService('/account/api/oauth/sessions/kill')
        return await self.delete(r, params=params, auth=auth)