Coder Social home page Coder Social logo

dota2-storageapi's Introduction

#Storage API ######Storage API interface to store data for Dota 2 Custom Game players.

##How to setup

  • Clone or download the storageapi folder into your addon's vscript folder
  • Get API key from http://dota2.tools/api/v1/storage/createApiKey?game=<Name of your custom game>&author=<Your name> or make your own server receiver and edit STORAGEAPI_API_URL in storage.lua
  • Check info on server responses at the bottom of this readme if you decide to build your own reciever

##Usage

require('storageapi/json')
require('storageapi/storage')

Storage:SetApiKey(api_key)

Storage:Put( steam_id, data, function( resultTable, successBool )
	if successBool then
		print("Successfully put data in storage")
	end
end)

Storage:Get( steam_id, function( resultTable, successBool )
	if successBool then
		DeepPrintTable(resultTable)
	end
end)

##Testing GET: STORAGEAPI_API_URL?api_key=<api_key>&steam_id=<steam_id>

PUT (POST): STORAGEAPI_API_URL?api_key=<api_key>&steam_id=<steam_id>&data=<json>

##Server

GET with query string api_key=<api_key>&steam_id=<steam_id> should return

{
	"data": {
		"api_key": string,
		"steam_id": string,
		"data": {
			json_object
		}
	}
}

POST with query string api_key=<api_key>&steam_id=<steam_id>&data=<json> should return

{
  "data": {
    "success": true
  }
}

Errors should return

{
  "errors": {
    "error_code": int,
    "message": string
  }
}

dota2-storageapi's People

Contributors

elinea avatar

Stargazers

Vusal avatar  avatar ReinHard124 avatar  avatar G_Seinfeld avatar Matthew Broatch avatar  avatar  avatar Tianren Li avatar Xavier Zheng avatar Nikolas avatar  avatar

Watchers

 avatar Xavier Zheng avatar  avatar

Forkers

only-coder

dota2-storageapi's Issues

Security Issues

Hi there and thank you for making the lib and hosting the storage for us.
If you are still around, i would have liked to know if your storage uses some kinds of checks whether the put/get requests were sent from a legitimate addon, or if it's just a scumbag trying to disrupt the data? How safe is it?
And if you have any advices on how to stop cheated data (gold/levels etc) from being stored i would gladly listen.
Big thanks in advance!

Is the StorageAPI broken?

My mod Dota Global Skillshots is using your storageAPI and mulfunctions today. Would you please solve the problem? Thanks!

dota2.tools/api/v1/storage?api_key=fc80985d01e14165c9ca9d03848eaecd58d3ede3&steam_id=161697269

Is this technology still possible?

Hello, I am Korean and I am using a translation question by google.
I have made a custom map of dota2 for about 5 months.
Implementing a level storage system is difficult and has a lot of delays.
A month later, the search found the StorageAPI.
But still can't solve some problem.

1)I can't make api id by "http://dota2.tools/api/v1/storage/". Is there any guide or something?
1-2)I found some guide about steam web api (https://steamwebapi.azurewebsites.net/)
so there are some data when I touch "http://api.steampowered.com/ISteamWebAPIUtil/GetSupportedAPIList/v1/?key=2EAA9276CA8750DFA2EADAD757A07544&steamid=76561198009353172"
Is it any relationship, or chance?
3)I little understand the example. especially, "function( resultTable, successBool )" in example.
need to put another thing? or literally resultTalbe, and successBool.
4)I also failed when I test print("working") in any storage, but DeepPrintTable show null.
Is it nature when I try to "print in storage.lua" fail?

Koreans are not interested in making dota2 custom maps and have no data. I am very depressed. If anyone can help me, please help me. If possible, I would like to contact you by email. [email protected]. It was made in 2015, please reply if you see. Thank you.

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.