Skip to main content

An unofficial SA-MP forum api

Project description

forum-py

GitHub issues GitHub pull requests GitHub pull license

forumpy is an unofficial SA-MP forum api.This python library ,integerated with selenium and phantomJS,helps you to automate SA-MP forum acitivities like send and get pms,threads,userinfo,contacts etc.Please view the example files for information about using these features in your python application.forumpy is still under development and has not yet been released.

Quick examples

  • Basic

      from forum.account import Account
      name = input("Input your forum user name : ")
      password = input("Input your forum password : ")
      a = Account(name,password)
      print("Logined with user id : ",a.id)
      print("\t**Account info**\n",a.User.info())
      print("\n\t***Contacts***\n")
      print("\tId\tUsername")
      for i in a.getcontacts():
          print("\t",i.id,"\t",i.name)
      print("\n\t***Threads***\n")
      print("\tTitle\tRatings\tAuthor")
      for i in a.User.getthreads():
          print(i.title,"\t",i.getrating(),"\t",i.author.name)
    
  • Send and Get private messages

      from forum.user import User
      from forum.account import Account
      name = input("Input forum username : ")
      password = input("Input forum password : ")
      a = Account(name,password)
      print(a.getpms())
      rec_names = input("Input name of recipents (seperated by space) : ").split(" ")
      users = []
      for rec_name in rec_names:
          users.append(User(a.getIdFromUserName(rec_name)))
      title = input("Input title : ")
      content = input("Input content : ")
      a.send_pm(users,title,content)
    

Please view examples files for more examples

Requirements

  • Python 3.5+
  • Selenium library
  • PhantomJS headless web driver
  • BeautifulSoup library

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

forumpy-0.0.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

forumpy-0.0.3-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file forumpy-0.0.3.tar.gz.

File metadata

  • Download URL: forumpy-0.0.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for forumpy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 dc96a0060c598769c4ed9e486e6a97846c255cea17e6b34a0d10fb9600d8ae28
MD5 d28c616ef9fa610a5476583826501a9b
BLAKE2b-256 72d572e09d53814bbe69951c6c5260327be6ea59ad7bcc7a8125ea63d409a1b3

See more details on using hashes here.

File details

Details for the file forumpy-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for forumpy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2415e721dfa624f2450755d11cbd2da81287d90335ad8e25565f66eeb48e399b
MD5 6c99dfdfe99bf9ffceebcbf3e26d3b85
BLAKE2b-256 22f41e5cffe007f7a7116bc29ae3713b2b5814b7896445eff48baebb8d97edb3

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