Git Product home page Git Product logo

freenet-funk-api's Introduction

Hey ๐Ÿ‘‹

That's what I'm doing currently:

  • ๐Ÿฆ€ Learning Rust

Feel free to look around my profile and contribute to my projects!

Have fun ๐ŸŽ‰

If you really like my work ๐Ÿ˜ƒ

I'm part of the official GitHub Sponsors program where you can support me on a monthly basis.

GitHub Sponsors

You can also contribute by buying me a coffee (this is a one-time donation).

Ko-Fi Sponsors

Thank you for your support! ๐Ÿ‘

freenet-funk-api's People

Contributors

dependabot[bot] avatar flobeier avatar kekskurse avatar knight1 avatar lagmoellertim avatar njannasch avatar scholzi100 avatar tc-maxx avatar thatch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freenet-funk-api's Issues

Reversed graphql types

I tried to reverse the graphql schema. I found about 20 types and additional functionality currently not in this api.
reversed schema: schema.graphql
raw capture: raw.graphql

Android app on version 1.2 was used.

Hopefully this is helpful for further advances in reverse engineering!

pip failes because requirements is missing

pip install freenet-funk-api failes with the following error:

Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-5HzpqK/freenet-funk-api/setup.py", line 6, in <module>
        with open('requirements.txt') as f:
    IOError: [Errno 2] No such file or directory: 'requirements.txt'

RAW request data?

Hi,

could someone give me raw reqest data for the api? I rebuilt the request in C# but I always get back the response '{"message": "Forbidden"}'. I added all the headers incl. a valid Aws-Access-Key.

Thank you!

Create wiki page about stack used

It would be nice to have some kind of wiki page with a listing of what stack Funk uses. And how the infrastructure of it works. (like app is using React and backend is running on AWS Cognito)

Message: ClientVersionnotSupported

I have been using this great api for a few months without any problems. However, since December it no longer works.

api.getData() and api.getToken() works.

But when I try to change my plan, the following error occurs:

{'errors': [{'message': 'ClientVersionNotSupported', 'locations': [{'line': 3, 'column': 3}], 'path': ['tarif
fAddToCustomerProduct'], 'extensions': {}}], 'data': None}

Am I the only one with this problem?

Receiving a 400 responce on stopLatestPlan()

It looks like I found a problem in the library while playing around with it. I noticed stopLatestPlan() always return a 400 staus code. So I digged a bit deeper.

I checked if there was a tariff on my account and there was:

{
    'id': '6236bfef-a85c-444e-b978-84e2bd574766',
    'booked': '2019-08-17T11:47:33.848Z',
    'starts': '2019-08-17T22:00:00.000Z',
    'state': 'READY',
    'productServiceId': '8',
    'productServiceInfo': {
        'id': '8',
        'label': 'unlimited',
        'follower': None,
        'marketingInfo': {
            'name': 'unlimited',
            '__typename': 'MarketingInfo'
        },
        '__typename': 'ProductService'
    },
    '__typename': 'TariffCustomerProductService'
}

By calling stopLastPlan() the content received always is:

'{
    "errors":[
        {
            "message":"Cannot query field \\"TariffFragment\\" on type \\"TariffCustomerProductService\\".",
            "locations":[
                {
                    "line":4,
                    "column":5
                }
            ],
            "extensions":{}
        },
        {
            "message":"Fragment \\"TariffFragment\\" is never used.",
            "locations":[
                {
                    "line":9,
                    "column":1
                }
            ],
            "extensions":{}
        }
    ]
}'

As stated in graphql_schema.py this must be the TariffFragment which is not set:

""",
    "remove_product": """
mutation TerminateTariffMutation($tariffID: String!) {
  tariffTerminate(customerProductServiceId: $tariffID) {
    TariffFragment
    __typename
  }
}

fragment TariffFragment on TariffCustomerProductService {
  id

I tried to replace TariffFragment in TerminateTariffMutation with ...TariffFragment. But this poduced a reply with status code 200 and following content:

{
    "errors":[
        {
            "message":"ABE-E0119: ErrCPSTerminateNotAllowedViaHandler",
            "locations":[
                {
                    "line":3,
                    "column":3
                }
            ],
            "path":[
                "tariffTerminate"
            ],
            "extensions":{}
        }
    ],
    "data":null
}'

To me it look like the server tries to prevent this action or something.

(refactord replies for readability)

ImportError: cannot import name 'Mapping' from 'collections'

I can't seem to import the module.

This is how I installed it:

~ $ virtualenv funkapi
created virtual environment CPython3.11.2.final.0-64 in 753ms
  creator CPython3Posix(dest=/data/data/com.termux/files/home/funkapi, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/data/data/com.termux/files/home/.local/share/virtualenv)
    added seed packages: pip==23.1.2, setuptools==67.8.0, wheel==0.40.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
~ $ source funkapi/bin/activate
(funkapi) ~ $ pip3 install funkapi
Collecting funkapi
  Using cached funkapi-0.1.5-py3-none-any.whl (5.6 kB)
Collecting boto3==1.9.145 (from funkapi)
  Using cached boto3-1.9.145-py2.py3-none-any.whl (128 kB)
Collecting botocore==1.12.145 (from funkapi)
  Using cached botocore-1.12.145-py2.py3-none-any.whl (5.4 MB)
Collecting certifi==2019.3.9 (from funkapi)
  Using cached certifi-2019.3.9-py2.py3-none-any.whl (158 kB)
Collecting chardet==3.0.4 (from funkapi)
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting docutils==0.14 (from funkapi)
  Using cached docutils-0.14-py3-none-any.whl (543 kB)
Collecting ecdsa==0.13.2 (from funkapi)
  Using cached ecdsa-0.13.2-py2.py3-none-any.whl (59 kB)
Collecting envs==1.3 (from funkapi)
  Using cached envs-1.3-py2.py3-none-any.whl (29 kB)
Collecting future==0.17.1 (from funkapi)
  Using cached future-0.17.1-py3-none-any.whl
Collecting idna==2.8 (from funkapi)
  Using cached idna-2.8-py2.py3-none-any.whl (58 kB)
Collecting jmespath==0.9.4 (from funkapi)
  Using cached jmespath-0.9.4-py2.py3-none-any.whl (24 kB)
Collecting pycryptodome==3.3.1 (from funkapi)
  Using cached pycryptodome-3.3.1-cp311-cp311-linux_aarch64.whl
Collecting python-dateutil==2.8.0 (from funkapi)
  Using cached python_dateutil-2.8.0-py2.py3-none-any.whl (226 kB)
Collecting python-jose-cryptodome==1.3.2 (from funkapi)
  Using cached python_jose_cryptodome-1.3.2-py2.py3-none-any.whl (19 kB)
Collecting requests==2.21.0 (from funkapi)
  Using cached requests-2.21.0-py2.py3-none-any.whl (57 kB)
Collecting s3transfer==0.2.0 (from funkapi)
  Using cached s3transfer-0.2.0-py2.py3-none-any.whl (69 kB)
Collecting six==1.12.0 (from funkapi)
  Using cached six-1.12.0-py2.py3-none-any.whl (10 kB)
Collecting urllib3==1.24.3 (from funkapi)
  Using cached urllib3-1.24.3-py2.py3-none-any.whl (118 kB)
Collecting warrant==0.6.1 (from funkapi)
  Using cached warrant-0.6.1-py2.py3-none-any.whl (26 kB)
Installing collected packages: pycryptodome, jmespath, envs, ecdsa, docutils, chardet, certifi, urllib3, six, idna, future, requests, python-jose-cryptodome, python-dateutil, botocore, s3transfer, boto3, warrant, funkapi
Successfully installed boto3-1.9.145 botocore-1.12.145 certifi-2019.3.9 chardet-3.0.4 docutils-0.14 ecdsa-0.13.2 envs-1.3 funkapi-0.1.5 future-0.17.1 idna-2.8 jmespath-0.9.4 pycryptodome-3.3.1 python-dateutil-2.8.0 python-jose-cryptodome-1.3.2 requests-2.21.0 s3transfer-0.2.0 six-1.12.0 urllib3-1.24.3 warrant-0.6.1

When I simply import it, I get this error:

(funkapi) ~ $ python3
Python 3.11.2 (main, Feb 11 2023, 14:06:23) [Clang 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from funkapi import FunkAPI
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/funkapi/__init__.py", line 1, in <module>
    from funkapi.api import FunkAPI
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/funkapi/api.py", line 2, in <module>
    import boto3
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/boto3/__init__.py", line 16, in <module>
    from boto3.session import Session
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/boto3/session.py", line 17, in <module>
    import botocore.session
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/session.py", line 29, in <module>
    import botocore.configloader
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/configloader.py", line 19, in <module>
    from botocore.compat import six
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/compat.py", line 25, in <module>
    from botocore.exceptions import MD5UnavailableError
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/exceptions.py", line 15, in <module>
    from botocore.vendored import requests
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/vendored/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/vendored/requests/utils.py", line 26, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/vendored/requests/compat.py", line 7, in <module>
    from .packages import chardet
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/vendored/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/vendored/requests/packages/urllib3/__init__.py", line 10, in <module>
    from .connectionpool import (
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 38, in <module>
    from .response import HTTPResponse
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/vendored/requests/packages/urllib3/response.py", line 9, in <module>
    from ._collections import HTTPHeaderDict
  File "/data/data/com.termux/files/home/funkapi/lib/python3.11/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py", line 1, in <module>
    from collections import Mapping, MutableMapping
ImportError: cannot import name 'Mapping' from 'collections' (/data/data/com.termux/files/usr/lib/python3.11/collections/__init__.py)

I've been running this in Termux on my Android device.

Missing files in sdist

It appears that the manifest is missing at least one file necessary to build
from the sdist for version 0.1.5. You're in good company, about 5% of other
projects updated in the last year are also missing files.

+ /tmp/venv/bin/pip3 wheel --no-binary funkapi -w /tmp/ext funkapi==0.1.5
Looking in indexes: http://10.10.0.139:9191/root/pypi/+simple/
Collecting funkapi==0.1.5
  Downloading http://10.10.0.139:9191/root/pypi/%2Bf/369/72e28a496073b/funkapi-0.1.5.tar.gz (4.6 kB)
    ERROR: Command errored out with exit status 1:
     command: /tmp/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-gsnackqr/funkapi/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-gsnackqr/funkapi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-wheel-gsnackqr/funkapi/pip-egg-info
         cwd: /tmp/pip-wheel-gsnackqr/funkapi/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-wheel-gsnackqr/funkapi/setup.py", line 6, in <module>
        with open('requirements.txt') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.