Skip to content

Commit

Permalink
Merge pull request #7 from simelo/stdevMac_t5_ruby_api_wrapper_skycoi…
Browse files Browse the repository at this point in the history
…n_api

fixes #5 - Ruby wrapper for Skycoin API
  • Loading branch information
olemis authored Apr 21, 2019
2 parents 8a0ee60 + 479b22c commit 088768f
Show file tree
Hide file tree
Showing 91 changed files with 13,764 additions and 17 deletions.
169 changes: 152 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,162 @@
# general things to ignore
build/
dist/
*.egg-info/
*.egg
*.py[cod]
__pycache__/
.pytest_cache
*.so
# Compiled source #
###################
*.class
*.dll
*.exe
*.o
*.orig
*.so

sb

build
data
pkg
bin
_obj

main

test_node

*~
client

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

#Copy of libskycoin.h in pyskycoin
swig/include/libskycoin.h
# Logs and databases #
######################
*.log
*.sql
*.sqlite

#Just for testing outside tox
tests/mytest.py
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db

*.pyx
#build
*~

*.orig

# due to using tox and pytest
.tox
.cache
release
.bin

.skycoin

*.prof
*.out

# Binaries
/skycoind
/skycoin
/skycoindev
/blockchain
/generate_cert
/address_gen
/skycoin-integration

*.pem

# Deprecated
_deprecated/

blockchain.bin
blockchain.sigs
master.keys
*.bak
benefactor-wallet.json
masterdata/
.genv

src/gui/static/dev
src/mesh/gui/static/dev

npm-debug.log

node_modules

electron/release
electron/.cache
electron/.electron_cache
electron/node_modules
electron/.gox_output
electron/.electron_output
electron/.standalone_output
electron/.daemon_output
electron/.cli_output
# Do not ignore the icons folder
!electron/build
!electron/build/icons

.vscode/

#File generation sublime text
.do.cfg
.do.state
skycoin.do

*.swp
*.swo
*.swp

src/mesh/TODO

.idea/

*.iml
*.test
coverage.html
coverage/
*.coverage.out

src/api/integration/wallets/
src/api/integration/wallets/

skycoin-cli

# FIXME: see #1027 - Temporary solution to deal with generated file
include/libskycoin.h

# Eclipse temp files
.cproject
.metadata/**
.project

# Generated docs
docs/libc/latex
docs/libc/man
docs/libc/xml


# Do not ignore Docker Cloud build
!hooks/build

*.prof
*.profile
*.cpuprofile
*.memprofile

# cli fiberAddressGen default output
addresses.txt
seeds.csv

histogram
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
lang: ruby

script: ./travis/skyapi.sh

rvm: 2.5
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## LibSkycoin-Ruby 0.25.1 - 2019/03/19

### Added

- Add `skyapi`, a wrapper for Skycoin api in version 0.25.1

### Fixed

- Fix #5 - Ruby API wrapper for the Skycoin node API


Empty file added Makefile
Empty file.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Skyapi, a Wrapper for Skycoin Api

This wrapper is Auto generated by openapi-generator directly from `Skycoin Api` code for version v0.25.1.

For further details of usage of `Skyapi wrapper for Skycoin Api` see [Autogenerated documentation](./lib/skyapi/README.md)

### Specific Node Address

For use a specific node of Skycoin, you just need to create a instance of `ApiClient` passing the node address:

```ruby
# Load the gem
require 'sky_api'

config =
api_instance = SkyApi::DefaultApi.new
# Set prefered host
api_instance.api_client.config.host = 'some_host'

begin
#Returns the total number of unique address that have coins.
result = api_instance.address_count
p result
rescue SkyApi::ApiError => e
puts "Exception when calling DefaultApi->address_count: #{e}"
end

```

Then in `skyapi` you can use all methods related to Api Client.
39 changes: 39 additions & 0 deletions lib/skyapi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by: https://openapi-generator.tech
#

*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

## Specific to RubyMotion:
.dat*
.repl_history
build/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
23 changes: 23 additions & 0 deletions lib/skyapi/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
1 change: 1 addition & 0 deletions lib/skyapi/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.4
2 changes: 2 additions & 0 deletions lib/skyapi/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--require spec_helper
Loading

0 comments on commit 088768f

Please sign in to comment.