Microlancer

Microlancer SDK


License
MIT
Install
pip install Microlancer==1.2

Documentation

Microlancer

Image

Donate Bitcoin ⚡️

Microlancer.io is a freelancer site that uses the Bitcoin lightnetwork as a way to paidmaneto, this library was made so that you can interact with the platform API in an easy and simple way.

  • Tasks
  • Services
  • Offer
  • Current
  • Withdraw

Instalation

(Microlancer) requires Python v3.8
$ pip install Microlancer

Login

Python 3.8.3 (default, Jun 16 2020, 19:00:28)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import Microlancer
>>>
>>> # [ Microlancer Login ]
>>>
>>> Login = Microlancer.Login('E-Mail', 'Password')
>>> Login.login(two2fa=52314) # If you have activated 2FA, pass the code in the flag two2fa=code

Tasks

>>> Tasks = Microlancer.Tasks()
>>>
>>> Tasks.list(first=1, lenght=50) # List tasks
{'sort': [822], 'tasks': {'822': {'id': 822, 'title': 'Try out Spendl App', 'titleWithBreaks': ...}
>>>
>>> Tasks.create('teste', 'teste', amount=1, repeatable=False, escrow=False) # Create new task.
{'hasErrors': False, 'formErrorMessage': None, ...}
>>>
>>> Tasks.view(1, first=1, lenght=2) # View tasks.
{'id': 1, 'calledExternally': False, 'title': '' ...}
>>>
>>> Tasks.comment(1, 'Hello Word') # Comment task.
{'hasErrors': False, 'formErrorMessage': None, 'formErrors': {'comment': '', 'taskId': '', 'csrfToken': '', 'hmacToken': '' ... }}
>>>  

Offer

>>> Offer = Microlancer.Offer()
>>>
>>> Offer.pitch(1, 'Hello Word', amount=1, pitch='I can do this task.') # Pitch offer
{'hasErrors': False, 'formErrorMessage': None, ...}
>>>
>>> Offer.reply(1, amount=1, pitch='I can do this task.') # Reply offer.
{'hasErrors': False, 'formErrorMessage': '' ...}
>>>
>>> Offer.retract(2, message='I can not do.') # Retract offer
{'hasErrors': False, 'formErrorMessage': '' ...}
>>>
>>> Offer.proposed(2, 50, message='') # New offer amount proposed: 50 sats
{'hasErrors': False, 'formErrorMessage': '' ...}
>>>
>>> Offer.view(1) # View offer
{'hasErrors': False, 'formErrorMessage': '' ...}

Notifications

>>> Notifications = Microlancer.Notifications()
>>>
>>> Notifications.dismiss([1]) # Notifications Dismiss
{'hasErrors': False, 'formErrorMessage': None, ...}
>>>
>>> Notifications.list(first=5, lenght=50, dismissed=True) # Notifications list
{'sort': [21333, ...] ...}

Current

>>> Microlancer.Current()
{'loggedIn': True, 'authState': 'loggedIn', 'username': '' ... }

Withdraw

>>> Withdraw = Microlancer.Withdraw(lnbc10n1p00 ..., two2fa=352146)
{"hasErrors": False, "formErrorMessage": None, ...}

Services

>>> Services = Microlancer.Services()
>>>
>>> Services.view(53) # Services view
{'id': 53, 'packages': [{'packageId': 92, ...} ...] ...}
>>>
>>> Services.list(first=1, lenght=50, status='any', minsats=1) # Services list
{'sort': [52, 47, 30, 13 ... ]}
>>>
>>> Services.create(escrow=True, packages=[{'title' : 'test', 'description' : 'test', 'amount' : 1}])
{'hasErrors': False, 'formErrorMessage': None, ...}
>>>