Giter Club home page Giter Club logo

gamejoltlua's Introduction

GameJolt.lua

Provides access to GameJolt's services for Lua-based projects.

Projects using gamejolt.lua

One Bit Arena
Random Rooms

Usage

Put the files from the repo into your app's folder.

local GJ = require "gamejolt"

GJ.init(gameID, gameKey)
GJ.authUser(username, usertoken)
GJ.openSession()

-- your further manipulations

Haxe-styled interface for GameJolt module:

interface GameJolt {
	static var username:String;
	static var userToken:String;
	static var isLoggedIn:Bool;
	static function init(id:Int, key:String, ?args:Dynamic):Void;
	// users
	static function authUser(name:String, token:String):Bool;
	static function fetchUserByName(name:String):UserInfo;
	static function fetchUserByID(id:Int):UserInfo;
	static function getCredentials(dir:String):Dynamic;
	// sessions
	static function openSession():Bool;
	static function pingSession(active:Bool):Bool;
	static function closeSession():Bool;
	// data store
	static function fetchData(key:String, ?isGlobal:Bool):Dynamic;
	static function setData(key:String, data:Dynamic, ?isGlobal:Bool):Bool;
	static function setBigData(key:String, data:Dynamic, ?isGlobal:Bool):Bool;
	static function updateData(key:String, value:String, operation:String, ?isGlobal:Bool):String;
	static function removeData(key:String, ?isGlobal:Bool):Bool;
	static function fetchStorageKeys(?isGlobal:Bool):Array<String>;
	// trophies
	static function giveTrophy(id:Int):Bool;
	static function fetchTrophy(id:Int):TrophyInfo;
	static function fetchTrophiesByStatus(achieved:Bool):Array<TrophyInfo>;
	static function fetchAllTrophies():Array<TrophyInfo>;
	// scores
	static function addScore(score:Float, desc:String, ?tableID:Int, ?guestName:String, ?extraData:String):Bool;
	static function fetchScores(limit:Int, ?tableID:Int):Array<ScoreInfo>;
	static function fetchTables():Array<TableInfo>;
}

Visit wiki / docs for more information.

Credits

GameJolt.lua is using kikito's MD5 and LuaSocket.

License (MIT)

Copyright (c) 2015 @insweater, @Positive07 and team.
This library is released under the MIT license.

gamejoltlua's People

Contributors

itsmapleleaf avatar pablomayobre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.