nise_api = NiseAPI()

scores = nise_api.get_single_score(replay_id=3808640439)
print(scores.adjusted_ur)

user = nise_api.get_user_details(username="degenerate")
print(user)

suspicious_scores = nise_api.get_suspicious_scores()
print(suspicious_scores)

stolen_replays = nise_api.get_similar_replays()
print(stolen_replays)

banlist = nise_api.get_banlist(page=1)
print(banlist)

score_query = {
  "queries": [
    {
      "predicates": [
        {
          "field": {
            "name": "user_rank",
            "type": "number"
          },
          "operator": {
            "operatorType": "<",
            "acceptsValues": "any"
          },
          "value": "50"
        },
        {
          "field": {
            "name": "ur",
            "type": "number"
          },
          "operator": {
            "operatorType": "<",
            "acceptsValues": "any"
          },
          "value": "120"
        }
      ],
      "logicalOperator": "AND"
    }
  ],
  "sorting": {
    "field": "user_id",
    "order": "ASC"
  },
  "page": 1
}
score_search = nise_api.search_scores(query=score_query)
print(score_search)

user_query = {
  "queries": [
    {
      "predicates": [
        {
          "field": {
            "name": "rank",
            "type": "number"
          },
          "operator": {
            "operatorType": ">",
            "acceptsValues": "any"
          },
          "value": "10"
        },
        {
          "field": {
            "name": "username",
            "type": "string"
          },
          "operator": {
            "operatorType": "=",
            "acceptsValues": "any"
          },
          "value": "degenerate"
        }
      ],
      "logicalOperator": "AND"
    }
  ],
  "sorting": {
    "field": "user_id",
    "order": "ASC"
  },
  "page": 1
}
user_search = nise_api.search_users(query=user_query)
print(user_search)
