Skip to main content

Foxhole WarAPI

Project description

foxhole-warapi-client

The War API allows developers to query information about the state of the current Foxhole World Conquest.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 1.0.0
  • Generator version: 7.8.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/Opa-/foxhole-warapi-python-client.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/Opa-/foxhole-warapi-python-client.git)

Then import the package:

import warapi

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import warapi

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import warapi
from warapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://war-service-live.foxholeservices.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = warapi.Configuration(
    host = "https://war-service-live.foxholeservices.com/api"
)



# Enter a context with an instance of the API client
with warapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = warapi.ExternalApi(api_client)

    try:
        # Hidden endpoint returning information about each server.
        api_response = api_instance.get_shard_status()
        print("The response of ExternalApi->get_shard_status:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ExternalApi->get_shard_status: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://war-service-live.foxholeservices.com/api

Class Method HTTP request Description
ExternalApi get_shard_status GET /external/shardStatus Hidden endpoint returning information about each server.
MapsApi get_map_dynamic GET /worldconquest/maps/{mapName}/dynamic/public Dynamic map data includes map icons that could change over the lifecycle of a map. This includes static bases and static base build sites.
MapsApi get_map_static GET /worldconquest/maps/{mapName}/static Static map data includes things that never change over the lifecycle of a map. This includes map text labels, resource nodes, and world structures.
MapsApi get_maps GET /worldconquest/maps Returns a list of the active World Conquest map names.
MapsApi get_war_report GET /worldconquest/warReport/{mapName} Returns the number of enlistments, casualties, and other map specific information.
WarApi get_war GET /worldconquest/war Returns data about the current state of the war.

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

warapi-1.0.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

warapi-1.0.0-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file warapi-1.0.0.tar.gz.

File metadata

  • Download URL: warapi-1.0.0.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/22.6.0

File hashes

Hashes for warapi-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a14c621a4eb5c78d14d4f7f712b5533ed3c828764173de52e0070f2dbd9932dc
MD5 7ae389fc82d59a38b5e41803e24c3081
BLAKE2b-256 c61dfd5c534c93ce651ac7ce2e009a6e197e38c964ec0774a76bdd1e731bd6a3

See more details on using hashes here.

File details

Details for the file warapi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: warapi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 37.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/22.6.0

File hashes

Hashes for warapi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad33bb56f5cb2ce377914d103497fb8cbe46b2700911a446e0a930060a4b79b4
MD5 4e6a722fa8181926c9a6c8fae694203b
BLAKE2b-256 462f253475e44f9b1e1c2518619d0a5b81d4dd00c351eb6b2940dfa2d1350c54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page