NEAR blockchain API implementation for ruby - nearprotocol

I am wondering if NEAR blockchain API implementation exists for ruby.
I can find API for js and a little bit for python, but not for ruby.

we don't have anything at this point for the ruby community but would be happy to fund a grant to support this work if you are interested and able to deliver it
apply for a grant here: near.university / teach
you can start here to explore the API
https://docs.near.org/docs/api/overview
and investigate the JS, Python and Rust API wrappers for inspiration
JS: https://github.com/near/near-api-js
Python: https://pypi.org/project/json-rpc/
Rust: https://github.com/near/near-jsonrpc-client-rs
and here's a little more context about building on NEAR that may help https://stackoverflow.com/a/61953470/2836874

Related

Google Pay PaymentMethodTokenRecipient function implementation in Golang

I am trying to implement Google Pay decryption method as mentioned.
https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#decrypt-token
It mentions to use tink library with the example of Java (PaymentMethodTokenRecipient) but I'm unable to duplicate it for Golang.
I'm not personally familiar with the library, but have a look at Tink.
There's a decrypt method that may do what you are after, and a cli that may help with how to use it: https://github.com/google/tink/blob/master/tools/testing/go/hybrid_decrypt_cli.go

Aliasing the Module in Google-API-client Gem

Summarize the problem:
Being relatively new to Ruby/Gems and developing in general, some concepts evade me
I'm learning about the google-api-client Gem, and am attempting to understand the Basic Usage, and want to know how a developer knows which class to use, when instantiating an ojbect, during the "aliasing of the module" portion:
To use an API, include the corresponding generated file and instantiate the service. For example to use the Drive API:
require 'google/apis/drive_v2'
Drive = Google::Apis::DriveV2 # Alias the module
drive = Drive::DriveService.new # why is ::DriveService used here?
#etc
Describe what I've tried:
I've searched through the reference documentation for the google-api-client for a clue about the "decision" to instantiate drive with ::DriveService.new
The best reason I've come up with is: DriveService is instantiated because it is the "BaseService" of the "DriveV2" Class.... but I'm reaching for straws with this logic.
My specific question is:
How does a developer using APIs and this Google-API-client Gem know which object to instantiate?
I have to imagine there's a more elegant "way" to determine which object to instantiate at this point of accessing an API than digging through the documentation of the Gem....I mean...the "BaseService" information is coming from the documentation for this specific Gem.....
Maybe this is a matter of me losing "scope" per say by the Google API and the ambiguously named Gem maintained by Google...
But then again...if I'm using this Gem...then this documentation would always apply, because I wouldn't be able to use this Gem if it wasn't a Google-API....
from the documentation
The link above is the necessary detail regarding Authorization for an API key.
If you're like me, and this subject is new to you, there are three topics that you need to understand:
Authentication
Authorization
Accounting
The documentation for the google-api-client gem is robust enough to answer a lot of questions, however, my answer here is hopefully enough to get you pointed in the right direction.
I'm leaving the question up, in case anyone else needs some guidance regarding this same subject.

What is the "annotate" method in Google Vision API?

I am reading the Google Vision API documentation:
(https://cloud.google.com/vision/docs/requests-and-responses)
It says something like the follwing:
Currently, the Vision API consists of one collection (images) which supports one HTTP Request method (annotate):
POST https://vision.googleapis.com/v1/images:annotate
My question is what does it mean by the method "annotate"? Also, how do I read this syntax with the colon ":"? Is this just a notation that Google uses or some kind of industry standard where you use the colon and calling the stuff after a "method"?
I am a financial Java developer but noob to Web/HTTP technology (I have read some basic of GET/POST but that did not seem to help me with this question). If it seems to you that I am totally lacking in some fundamentals, is there any pointer for me to read up some related books/website/tutorial/documentation that can help me understand this better? Any help is appreciated!

how to get the api for antlr ruby

Now I'm trying to implement antlr Ruby target. Where can I the antlr's api for Ruby?
I visited the http://www.antlr3.org/api/index.html, but only can find java api, python api. Why is there no api for ruby?
visit first : http://antlr.ohboyohboyohboy.org/ Guide to ANTLR for Ruby, I think it's a good start.
google is your friend

Accessing the Evernote API through Ruby

I have a bunch of notes in Evernote which I would like to access in a Rubyish way (instead of only using the web interface). I thought I'd use this gem (https://github.com/cgs/evernote), which is "...a high level wrapper around Evernote's Thrift-generated ruby code. It bundles up Evernote's thrift-generated code and creates some simple wrapper classes."
I got a developer key, and the sample code here (https://github.com/cgs/evernote/blob/master/example.rb) worked, giving me the correct name for my sandbox notebook.
However, I don't understand what to do next. By "simple wrapper classes" I was expecting the Evernote::EDAM::Type::Notebook object to be some Enumerable object that I could use blocks to query. I dunno, something like
notebook.select {|note| note.tags == 'foo'}
But when I do the notebook.TAB TAB trick in IRB to look at available methods, there is nothing like that. The author of the gem refers users to Evernote API at http://www.evernote.com/about/developer/api/ref/ , and I can't make heads or tails of the thing. Am I out of luck until I fully understand what things like THRIFT means, or is there a simple listing of methods somewhere that I'm failing to look?
You shouldn't have to learn anything about Thrift. The data model wrapper classes (Note, Notebook, Tag, etc) are basically dumb structs; the methods to exercise them are on the endpoint classes, UserStore and NoteStore. For example, to get a list of Notebooks, you'd call NoteStore.listNotebooks. You can see some examples in the SDK under ruby/sample.
I've run into this issue recently, to use Ruby accessing the Evernote API. And here is the list which may help:
Official Ruby Demo
Evernote Developer Guide
Evernote API: All declarations
ENML
And I wrote a demo to make it more specific and straight.
Evernote API Ruby demo

Resources