Skip to main content

Python XenForo Api lib

Project description

! PRE-VERSION !

Python Lib für die XenForo api

Sample:

from LordXen import XenForo

forum_url = input('URL ? ')
api_key = input('API_KEY ? ')

x = XenForo(url=forum_url, api_key=api_key)

xen_thread_800 = x.get_thread(800)
s = xen_thread_800.exists()
if s:
    print("Thread with id 800 exist")
else:
    print("Thread with id 800 not exist")


# get node
xen_node = x.get_node(209)

# create new thread
new_xen_thread = xen_node.create_thread('Test', message="LOL", tags='test')

# edit thread
s = new_xen_thread.edit(add_tags=['hello', 'world'], remove_tags=['test'])
if s:
    print(f"Thread with id {new_xen_thread.thread_id} edited!")

# post to thread
s = new_xen_thread.create_post('Hallo Test')
if s:
    print(f"Created post for {new_xen_thread.thread_id}")

Output:

Thread with id 800 exist
Thread with id 17291 edited!
Created post for 17291

by LordBex

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

LordXen-0.0.0.2.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file LordXen-0.0.0.2.tar.gz.

File metadata

  • Download URL: LordXen-0.0.0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for LordXen-0.0.0.2.tar.gz
Algorithm Hash digest
SHA256 9133dbef2edf05752cd9e294964feb6a648317806c021b45e57b57828dfa050c
MD5 ca31e37b5c2718252b9a9b443b8c20da
BLAKE2b-256 a45557ee3524f6dc127578a8ff19d21167991fc0eaccc379beb89392a3a5884b

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