Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.04 KB

README.md

File metadata and controls

52 lines (36 loc) · 1.04 KB

backstabbr_api

This is an DIY API using urllib.request for Backstabbr.

Usage

  • Requests the status of all players and returns them as a set.
get_submitted_countries()
  • Requests the number of supply center for each country and returns them as a set.
get_supply_center_count()

Example code:

from backstabbr_api import backstabbr_api as bs_api
import backstabbr_bot

def main():
    bsa = bs_api.BackstabbrAPI("[your session cookie, preferably as GM]", "[base link to your game]")
    submittedC = bsa.get_submitted_countries()
    supplyCC = bsa.get_supply_center_count()

    print(submittedC, "\n", supplyCC)

    for i in submittedC:
        print(i, submittedC[i])

    print()

    for i in supplyCC:
        print(i, supplyCC[i])



if __name__ == '__main__':
    main()

TODO

  • flesh out README and add more usage descriptions

Author

afkhurana

Contributors

J0hnny007

License

MIT