/Fromage

An API for the Atelier801's forums.

Primary LanguageLuaMIT LicenseMIT

Donate

Atelier801's Forum API written in Lua (5.1▲) using the Luvit runtime environment

About

The Atelier801's Forum is a forum created by the french company Atelier801 for players from Transformice, an online independent multiplayer free-to-play platform video game, and other smaller projects.

Luvit is an open-source, asynchronous I/O Lua runtime environment that makes HTTP requests possible for the Lua programming language.

Fromage API is a documented RESTful API that allows developers to make bots for the mentioned forum.

Join the Fifty Shades of Lua discord to discuss about this library and to have a special support.

Installation

  • To install Luvit, visit https://luvit.io and follow the instructions provided for your platform.
    • If you have problems installing it on Windows, please use Get-Lit
  • To install Fromage, run lit install Lautenschlager-id/fromage
  • Run your bot script using, for example, luvit bot.lua
If you are new and can't follow these steps, please consider using the MyFirstBot.zip that comes with the executables and API already.
(4MB) Windows | Linux

API Update

To update the API automatically all you need to do is to create a file named autoupdate in the bot's path.
You can create it running echo >> autoupdate (for Windows) or touch autoupdate (for Linux);

The update will overwrite all the old files and dependencies.

Base example

local api = require("fromage")
local client = api()

coroutine.wrap(function()
	client.connect("Username#0000", "password")

	if client.isConnected() then
		-- TODO
	end

	client.disconnect()
	os.execute("pause >nul")
end)()