
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
This Api is meant for 3rd party integrations
This client library is a Ruby gem which can be compiled and used in your Ruby and Ruby on Rails project. This library requires a few gems from the RubyGems repository.
gem build cyn_sms.gemspec
to build the gem.gem install cyn_sms-1.0.gem
The following section explains how to use the CynSms Ruby Gem in a new Rails project using RubyMine™. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.
Close any existing projects in RubyMine™ by selecting File -> Close Project
. Next, click on Create New Project
to create a new project from scratch.
Next, provide TestApp
as the project name, choose Rails Application
as the project type, and click OK
.
In the next dialog make sure that correct Ruby SDK is being used (minimum 2.0.0) and click OK
.
This will create a new Rails Application project with an existing set of files and folder.
In order to use the CynSms gem in the new project we must add a gem reference. Locate the Gemfile
in the Project Explorer window under the TestApp
project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: gem 'cyn_sms', '~> 1.0'
Once the TestApp
project is created, a folder named controllers
will be visible in the Project Explorer under the following path: TestApp > app > controllers
. Right click on this folder and select New -> Run Rails Generator...
.
Selecting the said option will popup a small window where the generator names are displayed. Here, select the controller
template.
Next, a popup window will ask you for a Controller name and included Actions. For controller name provide Hello
and include an action named Index
and click OK
.
A new controller class anmed HelloController
will be created in a file named hello_controller.rb
containing a method named Index
. In this method, add code for initialization and a sample for its usage.
You can test the generated SDK and the server with automatically generated test cases as follows:
bundle exec rake
API client can be initialized as following.
client = CynSms::CynSmsClient.new
The added initlization code can be debugged by putting a breakpoint in the Index
method and running the project in debug mode by selecting Run -> Debug 'Development: TestApp'
.
The singleton instance of the APIController
class can be accessed from the API Client.
client_controller = client.client
TODO: Add a method description
def create_send_sms(api_key,
to,
sms,
from); end
Parameter | Tags | Description |
---|---|---|
api_key | Required DefaultValue | set your API_KEY from http://sms.cynojine.com/sms-api/info (user panel) |
to | Required DefaultValue | the number we are sending to - Any phone number |
sms | Required | SMS Body |
from | Required | Change the from number below. It can be a valid phone number or a String |
api_key = 'xxxxxxxxxxxxx'
to = '260986'
sms = 'sms'
from = 'from'
result = client_controller.create_send_sms(api_key, to, sms, from)
Checking SMS Balance
def get_balance_check(options = {},
_query_parameters = nil); end
Parameter | Tags | Description |
---|---|---|
api_key | Required | Get your account balance |
response | Required DefaultValue | Json Responce |
_query_parameters | Optional | Additional optional query parameters are supported by this method |
collect = Hash.new
api_key = 'api_key'
collect['api_key'] = api_key
response = 'json'
collect['response'] = response
# key-value map for optional query parameters
queryParams = { 'key' => 'value' }
client_controller.get_balance_check(collect, queryParams, )
FAQs
Unknown package
We found that CynSMS demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.