Giter Site home page Giter Site logo

ald / lidlconnect Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 12 KB

A library for the LIDL Connect API. Allows access to e. g. account balance, overview of booked tariffs or booking tariffs. Easily extensible.

License: GNU Lesser General Public License v2.1

Python 100.00%
api lidl lidl-connect

lidlconnect's Introduction

lidlconnect

Usage

Initialize

In [1]: import lidlconnect

In [2]: lidl = lidlconnect.LIDLConnect(
   ...:     username="01520123456789", password="123456"
   ...: )

Current balance

In [1]: lidl.balance
Out[1]: 8.86

Available tariffs

In [1]: [ (t['name'], t['tariffoptionId']) for t in lidl.tariffs ]
Out[1]:
[('DayFlat', 'CCS_92016'),
 ('DayFlat 100', 'CCS_92038'),
 ('Internetoption 500 MB', 'CCS_92001'),
 ('Internetoption 1 GB', 'CCS_92002'),
 ('Minuten-Option 100', 'CCS_92008'),
 ('Community-Flatrate', 'CCS_92009'),
 ('Festnetz-Flatrate', 'CCS_92003')]

Booked tariffs

In [1]: lidl.booked_tariffs
Out[1]:
[{'automaticExtension': False,
  'tariffoptionId': 'CCS_92008',
  'name': 'Minuten-Option 100',
  'price': 199,
  'duration': {'amount': 14, 'unit': 'DAY'},
  'statusKey': 'CDL',
  'startOfRuntime': '2022-12-20T00:00:00+01:00',
  'endOfRuntime': '2023-01-03T00:00:00+01:00',
  'possibleChangingDate': '03.01.2023',
  'buttonText': 'Kündbar zum 03.01.2023',
  'cancelable': False,
  'formattedPrice': '1,99 €',
  'restrictedService': False,
  'tariffState': 'Gültig bis 03.01.2023'}]

Book something

logging.basicConfig(level=logging.INFO)

lidl.buy_tariff_option(name="Minuten-Option 100")

INFO:root:Nothing to do, available balance is: 71/100

lidlconnect's People

Contributors

ald avatar

Stargazers

 avatar

Watchers

 avatar

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.