flox 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +3 -0
  3. data/LICENSE.md +28 -0
  4. data/README.md +78 -0
  5. data/lib/flox/version.rb +1 -1
  6. metadata +4 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e270b70cbf4293d5e3ded85a0e179a1aadecb21
4
- data.tar.gz: 7a9dd4ddb98a13d4491fbe12c677c8f77779a450
3
+ metadata.gz: 0bfcc3ed174c17361a262d7634fe46f422b68305
4
+ data.tar.gz: 8c9a1c957fe98e7b0e557212e5cea525db3a8be7
5
5
  SHA512:
6
- metadata.gz: 9233cde0da9935db8d8e9b4aa2e00177eee2f68c2ef46a9db828b3f247fa2a609fe15ac9198b13fbbf6aeb0db18da71b580edbb632ced6491807f0b4ef01f2c2
7
- data.tar.gz: d748fe1818ce22e485257ed39916ab5211cb8b0a18c0f1f05ae53578726391de3e0a764934ce1c8f48d85ba043cd6ff207ab9f96880a9b7b17fb2dad9944e7d8
6
+ metadata.gz: 6f5bdb3a1b5391172b3ae9ee2b338e12df39589c8374934aaf17ec026978d1b8206d4d07b7a2f7a4dfbdc419dde912caf83aee9ff4044684391e6d89b5c4e4b4
7
+ data.tar.gz: dc46222be994747ca4a6e6b4b0dd6cdb7e5364902d7c7eb1587dd596319fc8db9b254abd4ef9138c3270762e80aa359039b34a2718c7099ed5edf68c4b9dfbe8
@@ -0,0 +1,3 @@
1
+ --readme README.md
2
+ --title 'Flox-Ruby API Documentation'
3
+ --markup markdown
@@ -0,0 +1,28 @@
1
+ Simplified BSD License
2
+ ======================
3
+
4
+ Copyright 2014 Gamua. All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without modification,
7
+ are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this list of
10
+ conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
13
+ of conditions and the following disclaimer in the documentation and/or other materials
14
+ provided with the distribution.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY GAMUA "AS IS" AND ANY EXPRESS OR IMPLIED
17
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
18
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GAMUA OR
19
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+
26
+ The views and conclusions contained in the software and documentation are those of the
27
+ authors and should not be interpreted as representing official policies, either expressed
28
+ or implied, of Gamua.
@@ -0,0 +1,78 @@
1
+ # Flox Tools for Ruby
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/flox.png)](http://badge.fury.io/rb/flox)
4
+ [![Build Status](https://travis-ci.org/Gamua/Flox-Ruby.png?branch=master)](https://travis-ci.org/Gamua/Flox-Ruby)
5
+
6
+ ## What is Flox?
7
+
8
+ Flox is a server backend especially for game developers, providing all the basics you need for a game: analytics, leaderboards, custom entities, and much more. The focus of Flox lies on its scalability (guaranteed by running in the Google App Engine) and ease of use.
9
+
10
+ While you can communicate with our servers directly via REST, we provide powerful SDKs for the most popular development platforms, including advanced features like offline-support and data caching. With these SDKs, integrating Flox into your game is just a matter of minutes.
11
+
12
+ * More information about Flox can be found on [Flox.cc](http://www.flox.cc)
13
+ * The source code of the Ruby SDK is hosted on [GitHub.com](https://github.com/Gamua/Flox-Ruby)
14
+ * The API reference of the Ruby SDK can be found on [RubyDoc.info](http://rubydoc.info/gems/flox/frames)
15
+
16
+ ## How to install the Flox Gem
17
+
18
+ Flox is distributed as a Ruby Gem, so you can install it just like any other gem:
19
+
20
+ gem install flox
21
+
22
+ ## How to use the Flox executable
23
+
24
+ The Gem comes with a small command-line script that is automatically added to your system PATH. The script can be used to carry out certain tasks very easily. To get a list of supported commands, run
25
+
26
+ flox --help
27
+
28
+ As an example, here's how to download all the log files of a certain day that have at least severity "warning":
29
+
30
+ flox load_logs --game_id "id" --game_key "key" --hero_key "key" \
31
+ --query "day:2014-03-10 severity:warning" \
32
+ --destination "logs"
33
+
34
+ Note that you need to authorize with a "Hero" key. A hero is a special Flox player that has super-user rights; create it in the Flox online interface.
35
+
36
+ ## How to use the Flox SDK
37
+
38
+ The Ruby client is designed to be used not in games, but in scripts that help you operate your games. You can use it e.g. to automatically download your leaderboards or certain entities for backup. It's also easy to utilize Flox via 'irb', allowing quick introspection into your server data.
39
+
40
+ To start up, create a Flox instance with your game id and key:
41
+
42
+ flox = Flox.new('game-id', 'game-key')
43
+
44
+ Just like in the command-line script, you'll need to login as a 'Hero':
45
+
46
+ flox.login_with_key('hero-key')
47
+
48
+ We're done with the preparations! Now let's look at some of the things you can do.
49
+
50
+ ### Working with Entities
51
+
52
+ # load an entity with a certain type and id
53
+ entity = flox.load_entity('entity-type', 'entity-id') # => Flox::Entity
54
+
55
+ # modify it via the []-operator
56
+ entity['myProperty'] = 'something'
57
+
58
+ # save or delete at will
59
+ flox.save_entity(entity)
60
+ flox.delete_entity(entity)
61
+
62
+ ### Accessing leaderboards
63
+
64
+ # load scores from a leaderboard
65
+ scores = flox.load_scores('leaderboard-id', :today) # => Array of Flox::Score
66
+ best_score = scores.first.value
67
+ best_player_id = scores.first.player_id
68
+
69
+ ### Loading logs
70
+
71
+ # load all logs from a certain day that contain a warning or error
72
+ logs = flox.load_logs('day:2014-02-22 warning')
73
+ num_logs = logs.length
74
+ logs.each { |log| puts log['duration'] }
75
+
76
+ ## Where to go from here:
77
+
78
+ This is just the tip of the iceberg! Have a look at the complete API Reference to find out what's possible. New features will be added regularly!
@@ -9,6 +9,6 @@
9
9
  class Flox
10
10
 
11
11
  # The current version of the Flox SDK.
12
- VERSION = '0.1.0'
12
+ VERSION = '0.1.1'
13
13
 
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Sperl
@@ -91,6 +91,9 @@ executables:
91
91
  extensions: []
92
92
  extra_rdoc_files: []
93
93
  files:
94
+ - README.md
95
+ - LICENSE.md
96
+ - ".yardopts"
94
97
  - bin/flox
95
98
  - test/test_entity.rb
96
99
  - test/test_flox.rb