Code Monkey home page Code Monkey logo

onesignal-ruby-api's Introduction

onesignal

OneSignal - the Ruby gem for the OneSignal

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.2.2
  • Package version: 2.0.2
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://onesignal.com

Installation

Build a gem

To build the Ruby code into a gem:

gem build onesignal.gemspec

Then either install the gem locally:

gem install ./onesignal-2.0.2.gem

(for development, run gem install --dev ./onesignal-2.0.2.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'onesignal', '~> 2.0.2'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'onesignal', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'onesignal'

# Setup authorization
OneSignal.configure do |config|
  # Configure Bearer authorization: app_key
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = OneSignal::DefaultApi.new
app_id = 'app_id_example' # String | The OneSignal App ID for your app.  Available in Keys & IDs.
activity_id = 'activity_id_example' # String | Live Activity record ID
begin_live_activity_request = OneSignal::BeginLiveActivityRequest.new({push_token: 'push_token_example', subscription_id: 'subscription_id_example'}) # BeginLiveActivityRequest | 

begin
  #Start Live Activity
  api_instance.begin_live_activity(app_id, activity_id, begin_live_activity_request)
rescue OneSignal::ApiError => e
  puts "Exception when calling DefaultApi->begin_live_activity: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://onesignal.com/api/v1

Class Method HTTP request Description
OneSignal::DefaultApi begin_live_activity POST /apps/{app_id}/live_activities/{activity_id}/token Start Live Activity
OneSignal::DefaultApi cancel_notification DELETE /notifications/{notification_id} Stop a scheduled or currently outgoing notification
OneSignal::DefaultApi create_app POST /apps Create an app
OneSignal::DefaultApi create_notification POST /notifications Create notification
OneSignal::DefaultApi create_player POST /players Add a device
OneSignal::DefaultApi create_segments POST /apps/{app_id}/segments Create Segments
OneSignal::DefaultApi create_subscription POST /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions
OneSignal::DefaultApi create_user POST /apps/{app_id}/users
OneSignal::DefaultApi delete_alias DELETE /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}
OneSignal::DefaultApi delete_player DELETE /players/{player_id} Delete a user record
OneSignal::DefaultApi delete_segments DELETE /apps/{app_id}/segments/{segment_id} Delete Segments
OneSignal::DefaultApi delete_subscription DELETE /apps/{app_id}/subscriptions/{subscription_id}
OneSignal::DefaultApi delete_user DELETE /apps/{app_id}/users/by/{alias_label}/{alias_id}
OneSignal::DefaultApi end_live_activity DELETE /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} Stop Live Activity
OneSignal::DefaultApi export_events POST /notifications/{notification_id}/export_events?app_id={app_id} Export CSV of Events
OneSignal::DefaultApi export_players POST /players/csv_export?app_id={app_id} Export CSV of Players
OneSignal::DefaultApi fetch_aliases GET /apps/{app_id}/subscriptions/{subscription_id}/user/identity
OneSignal::DefaultApi fetch_user GET /apps/{app_id}/users/by/{alias_label}/{alias_id}
OneSignal::DefaultApi fetch_user_identity GET /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity
OneSignal::DefaultApi get_app GET /apps/{app_id} View an app
OneSignal::DefaultApi get_apps GET /apps View apps
OneSignal::DefaultApi get_eligible_iams GET /apps/{app_id}/subscriptions/{subscription_id}/iams
OneSignal::DefaultApi get_notification GET /notifications/{notification_id} View notification
OneSignal::DefaultApi get_notification_history POST /notifications/{notification_id}/history Notification History
OneSignal::DefaultApi get_notifications GET /notifications View notifications
OneSignal::DefaultApi get_outcomes GET /apps/{app_id}/outcomes View Outcomes
OneSignal::DefaultApi get_player GET /players/{player_id} View device
OneSignal::DefaultApi get_players GET /players View devices
OneSignal::DefaultApi identify_user_by_alias PATCH /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity
OneSignal::DefaultApi identify_user_by_subscription_id PATCH /apps/{app_id}/subscriptions/{subscription_id}/user/identity
OneSignal::DefaultApi transfer_subscription PATCH /apps/{app_id}/subscriptions/{subscription_id}/owner
OneSignal::DefaultApi update_app PUT /apps/{app_id} Update an app
OneSignal::DefaultApi update_live_activity POST /apps/{app_id}/live_activities/{activity_id}/notifications Update a Live Activity via Push
OneSignal::DefaultApi update_player PUT /players/{player_id} Edit device
OneSignal::DefaultApi update_player_tags PUT /apps/{app_id}/users/{external_user_id} Edit tags with external user id
OneSignal::DefaultApi update_subscription PATCH /apps/{app_id}/subscriptions/{subscription_id}
OneSignal::DefaultApi update_user PATCH /apps/{app_id}/users/by/{alias_label}/{alias_id}

Documentation for Models

Documentation for Authorization

app_key

  • Type: Bearer authentication

user_key

  • Type: Bearer authentication

onesignal-ruby-api's People

Contributors

jbender avatar jkasten2 avatar jmadler avatar kesheshyan avatar rgomezp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onesignal-ruby-api's Issues

[Bug]: `custom_data` is not a valid attribute in `OneSignal::Notification`

What happened?

Reading documentation about message personalization, I found a option to send a param called custom_param. But, when I try to send param custom_data, the gem return a error:

`custom_data` is not a valid attribute in `OneSignal::Notification`

Steps to reproduce?

Just create a notification with param `custom_data`.


notification = OneSignal::Notification.new({
  app_id: ENV["ONE_SIGNAL_APP_ID"],
  template_id: template_id || nil,
  include_external_user_ids: user_ids,
  custom_data: custom_data || {},
})

api_instance.create_notification(notification)

What did you expect to happen?

I expect the notification been created successfully.

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

[question]: when creating a Notification should `isIos` default to `true`?

How can we help?

Is it intentional for isIos to default to true when creating a Notification?

For example, this request (that doesn't specify is_ios) results in an API request with a body where isIos is set to true:

notification = OneSignal::Notification.new({
  app_id: 'YOUR APP ID',
  include_external_user_ids: [user.id],
  channel_for_external_user_ids: 'push',
  contents: {
    en: body
  },
})
one_signal_client.create_notification(notification)

It looks like it's because of this default: https://github.com/OneSignal/onesignal-ruby-api/blob/master/lib/onesignal/models/notification.rb#L793

Code of Conduct

  • I agree to follow this project's Code of Conduct

Request params not being included in request

It's unclear how to create a notification, and the docs don't help with accomplishing this task. In addition, the error messages aren't helpful to unblock devs who are stuck. Essentially, the error message leads the developer to think the issue is their fault when, in reality, the bug has little to do with what the user did.

╭─iamwill@kronos ~/code/@onesignalDevelopers/onesignal-ruby-sample ‹main●›
╰─$ bundle exec ruby app.rb

From: /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb @ line 51 :

    46:     #
    47:     # @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
    48:     #   the data deserialized from response body (could be nil), response status code and response headers.
    49:     def call_api(http_method, path, opts = {})
    50:       request = build_request(http_method, path, opts)
 => 51:       binding.irb
    52:
    53:       response = request.run
    54:
    55:       if @config.debugging
    56:         @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"

irb(#<OneSignal::ApiClient:0x00000001005e88b8>):001:0> request
=>
#<Typhoeus::Request:0x000000010056a198
 @base_url="https://onesignal.com/api/v1/notifications",
 @options=
  {:method=>:post,
   :headers=>
    {"User-Agent"=>"OpenAPI-Generator/1.0.0/ruby",
     "Content-Type"=>"application/json",
     "Accept"=>"application/json",
     "OS-Usage-Data"=>"kind=sdk, name=onesignal-ruby, version=1.0.0",
     "Authorization"=>"Bearer token=\"ZDI1ZGU3MWEtOTVlZC00ZDU1LWJlM2QtMTQ1YjJhNmI4YTQ2\"",
     "Expect"=>""},
   :params=>{},
   :params_encoding=>nil,
   :timeout=>0,
   :ssl_verifypeer=>true,
   :ssl_verifyhost=>2,
   :sslcert=>nil,
   :sslkey=>nil,
   :verbose=>false,
   :body=>"{\"isIos\":true,\"app_id\":\"e94108a6-83a3-4293-8d69-e1d634877f4b\",\"contents\":{\"en\":\"English Message\"}}",
   :maxredirs=>50},
 @original_options=
  {:method=>:post,
   :headers=>
    {"Content-Type"=>"application/json",
     "User-Agent"=>"OpenAPI-Generator/1.0.0/ruby",
     "Accept"=>"application/json",
     "OS-Usage-Data"=>"kind=sdk, name=onesignal-ruby, version=1.0.0",
     "Authorization"=>"Bearer token=\"ZDI1ZGU3MWEtOTVlZC00ZDU1LWJlM2QtMTQ1YjJhNmI4YTQ2\""},
   :params=>{},
   :params_encoding=>nil,
   :timeout=>0,
   :ssl_verifypeer=>true,
   :ssl_verifyhost=>2,
   :sslcert=>nil,
   :sslkey=>nil,
   :verbose=>false,
   :body=>"{\"isIos\":true,\"app_id\":\"e94108a6-83a3-4293-8d69-e1d634877f4b\",\"contents\":{\"en\":\"English Message\"}}"}>
irb(#<OneSignal::ApiClient:0x00000001005e88b8>):002:0> continue
/Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb:2:in `call_api': undefined local variable or method `continue' for #<OneSignal::ApiClient:0x00000001005e88b8 @config=#<OneSignal::Configuration:0x00000001005ea258 @scheme="https", @host="onesignal.com", @base_path="/api/v1", @server_index=0, @server_operation_index={}, @server_variables={}, @server_operation_variables={}, @timeout=0, @client_side_validation=true, @verify_ssl=true, @verify_ssl_host=true, @params_encoding=nil, @cert_file=nil, @key_file=nil, @debugging=false, @inject_format=false, @force_ending_format=false, @logger=#<Logger:0x00000001005e9f88 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x00000001005e9d80 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000001005e98d0 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x00000001005e9740>, @mon_data_owner_object_id=1040>>, @app_key="ZDI1ZGU3MWEtOTVlZC00ZDU1LWJlM2QtMTQ1YjJhNmI4YTQ2">, @user_agent="OpenAPI-Generator/1.0.0/ruby", @default_headers={"Content-Type"=>"application/json", "User-Agent"=>"OpenAPI-Generator/1.0.0/ruby"}> (NameError)
Did you mean?  context
	from <internal:prelude>:5:in `irb'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb:51:in `call_api'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api/default_api.rb:215:in `create_notification_with_http_info'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api/default_api.rb:163:in `create_notification'
	from app.rb:21:in `<main>'
irb(#<OneSignal::ApiClient:0x00000001005e88b8>):003:0>
irb(#<OneSignal::ApiClient:0x00000001005e88b8>):004:0>
irb(#<OneSignal::ApiClient:0x00000001005e88b8>):005:0> next
/Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb: /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb:5: Can't escape from eval with next (SyntaxError)

I tried to play around with the param to see if I could it it to show up in the request

require 'dotenv/load'
require 'time'
require 'onesignal'

rest_api_key = ENV['ONESIGNAL_REST_API_KEY']
app_id = ENV['ONESIGNAL_APP_ID']

# setup authorization
OneSignal.configure do |config|
  # Configure Bearer authorization: app_key
  config.app_key = rest_api_key
end

api_instance = OneSignal::DefaultApi.new

begin
  # Create notification
  notification = OneSignal::Notification.new({ app_id: app_id })
  notification.contents = OneSignal::StringMap.new({ "en": 'English Message' })
  notification.included_segments = ['Active Users']

  notification_response = api_instance.create_notification(notification)
  notification_id = notification_response.id
  p result
rescue OneSignal::ApiError => e
  # binding.irb
  puts "Error when calling DefaultApi->create_notification: #{e}"
end

☝🏾 I know this code is incorrect; I only did it to see what I had to do to get the Active Users segment in the request. If I follow the docs, the param isn't included in the request, and I get the error I mentioned in #10.

HTTP Request being made
From: /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb @ line 51 :

    46:     #
    47:     # @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
    48:     #   the data deserialized from response body (could be nil), response status code and response headers.
    49:     def call_api(http_method, path, opts = {})
    50:       request = build_request(http_method, path, opts)
 => 51:       binding.irb
    52:
    53:       response = request.run
    54:
    55:       if @config.debugging
    56:         @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"

irb(#<OneSignal::ApiClient:0x00000001013a9290>):001:0> request
=>
#<Typhoeus::Request:0x000000010132a800
 @base_url="https://onesignal.com/api/v1/notifications",
 @options=
  {:method=>:post,
   :headers=>
    {"User-Agent"=>"OpenAPI-Generator/1.0.0/ruby",
     "Content-Type"=>"application/json",
     "Accept"=>"application/json",
     "OS-Usage-Data"=>"kind=sdk, name=onesignal-ruby, version=1.0.0",
     "Authorization"=>"Bearer token=\"ZDI1ZGU3MWEtOTVlZC00ZDU1LWJlM2QtMTQ1YjJhNmI4YTQ2\"",
     "Expect"=>""},
   :params=>{},
   :params_encoding=>nil,
   :timeout=>0,
   :ssl_verifypeer=>true,
   :ssl_verifyhost=>2,
   :sslcert=>nil,
   :sslkey=>nil,
   :verbose=>false,
   :body=>"{\"included_segments\":[\"Active Users\"],\"isIos\":true,\"app_id\":\"e94108a6-83a3-4293-8d69-e1d634877f4b\",\"contents\":{\"en\":\"English Message\"}}",
   :maxredirs=>50},
 @original_options=
  {:method=>:post,
   :headers=>
    {"Content-Type"=>"application/json",
     "User-Agent"=>"OpenAPI-Generator/1.0.0/ruby",
     "Accept"=>"application/json",
     "OS-Usage-Data"=>"kind=sdk, name=onesignal-ruby, version=1.0.0",
     "Authorization"=>"Bearer token=\"ZDI1ZGU3MWEtOTVlZC00ZDU1LWJlM2QtMTQ1YjJhNmI4YTQ2\""},
   :params=>{},
   :params_encoding=>nil,
   :timeout=>0,
   :ssl_verifypeer=>true,
   :ssl_verifyhost=>2,
   :sslcert=>nil,
   :sslkey=>nil,
   :verbose=>false,
   :body=>"{\"included_segments\":[\"Active Users\"],\"isIos\":true,\"app_id\":\"e94108a6-83a3-4293-8d69-e1d634877f4b\",\"contents\":{\"en\":\"English Message\"}}"}>

I also think there's a bug in the client in general as the parameters aren't making it into the request.

Result of execution
╭─iamwill@kronos ~/code/@onesignalDevelopers/onesignal-ruby-sample ‹main●›
╰─$ bundle exec ruby app.rb
/Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/models/inline_response200.rb:203:in `const_get': uninitialized constant OneSignal::OneOfobjectarray (NameError)

        klass = OneSignal.const_get(type)
                         ^^^^^^^^^^
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/models/inline_response200.rb:203:in `_deserialize'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/models/inline_response200.rb:158:in `block in build_from_hash'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/models/inline_response200.rb:148:in `each_pair'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/models/inline_response200.rb:148:in `build_from_hash'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/models/inline_response200.rb:140:in `build_from_hash'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb:281:in `convert_to_type'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb:241:in `deserialize'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api_client.rb:73:in `call_api'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api/default_api.rb:215:in `create_notification_with_http_info'
	from /Users/iamwill/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/onesignal-1.0.0.beta1/lib/onesignal/api/default_api.rb:163:in `create_notification'
	from app.rb:22:in `<main>'

Unable to get started using example code in the readme

When I attempt to run 👇🏾 this code...

Ruby program
require 'dotenv/load'
require 'time'
require 'onesignal'

rest_api_key = ENV['ONESIGNAL_REST_API_KEY']
app_id = ENV['ONESIGNAL_APP_ID']

# setup authorization
OneSignal.configure do |config|
  # Configure Bearer authorization: app_key
  config.app_key = rest_api_key
end

api_instance = OneSignal::DefaultApi.new
notification = OneSignal::Notification.new({ app_id: app_id })

begin
  # Create notification
  result = api_instance.create_notification(notification)
  p result
rescue OneSignal::ApiError => e
  puts "Error when calling DefaultApi->create_notification: #{e}"
end

I get the following error...

API Error message recieved
Error when calling DefaultApi->create_notification: Error message: the server returns an error
HTTP status code: 400
Response headers: {"date"=>"Mon, 07 Mar 2022 20:27:09 GMT", "content-type"=>"application/json; charset=utf-8", "status"=>"400 Bad Request", "ratelimit-limit"=>"6600", "access-control-allow-origin"=>"*", "cache-control"=>"no-cache", "referrer-policy"=>"strict-origin-when-cross-origin", "x-xss-protection"=>"1; mode=block", "ratelimit-remaining"=>"6625", "x-request-id"=>"7ceea0e7-4cdf-4555-890d-9b06fad52ec5", "access-control-allow-headers"=>"SDK-Version", "ratelimit-reference"=>"https://documentation.onesignal.com/docs/disabled-apps", "x-runtime"=>"0.012420", "x-frame-options"=>"SAMEORIGIN", "x-content-type-options"=>"nosniff", "ratelimit-reset"=>"1646684829", "x-envoy-upstream-service-time"=>"14", "vary"=>"Accept-Encoding", "cf-cache-status"=>"DYNAMIC", "expect-ct"=>"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", "server"=>"cloudflare", "cf-ray"=>"6e8611f8a9c1e02b-DFW", "alt-svc"=>"h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"}
Response body: {"errors":["You must include which players, segments, or tags you wish to send this notification to."]}
Response headers
Response headers: {
  "date"=>"Mon, 07 Mar 2022 20:14:39 GMT",
  "content-type"=>"application/json; charset=utf-8",
  "status"=>"400 Bad Request",
  "ratelimit-limit"=>"6600",
  "access-control-allow-origin"=>"*",
  "cache-control"=>"no-cache",
  "referrer-policy"=>"strict-origin-when-cross-origin",
  "x-xss-protection"=>"1; mode=block",
  "ratelimit-remaining"=>"6625",
  "x-request-id"=>"b8e64a6f-f0be-4e67-abdb-3afedeae777a",
  "access-control-allow-headers"=>"SDK-Version",
  "ratelimit-reference"=>"https://documentation.onesignal.com/docs/disabled-apps",
  "x-runtime"=>"0.008245",
  "x-frame-options"=>"SAMEORIGIN",
  "x-content-type-options"=>"nosniff",
  "ratelimit-reset"=>"1646684079",
  "x-envoy-upstream-service-time"=>"10",
  "vary"=>"Accept-Encoding",
  "cf-cache-status"=>"DYNAMIC",
  "expect-ct"=>"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
  "server"=>"cloudflare",
  "cf-ray"=>"6e85ffa63c1f93eb-DFW",
  "alt-svc"=>"h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"
}
Response body
Response body: {
  "errors": [
    "You must include which players, segments, or tags you wish to send this notification to."
  ]
}

The error indicates I must include which players, segments, or tags I wish to send this notification to. The problem is no documentation specifying how to do this.

Other notes

I had to change the line config.access_token = rest_api_key to config.app_key = rest_api_key because the method doesn't exist. I'm not sure about Ruby's nomenclature, but shouldn't this be an attribute?

Error message when using access_token
fun-with-onesignal.rb:8:in `block in <main>': undefined method `access_token=' for #<OneSignal::Configuration:0x000000013a887fa8 @scheme="https", @host="onesignal.com", @base_path="/api/v1", @server_index=0, @server_operation_index={}, @server_variables={}, @server_operation_variables={}, @timeout=0, @client_side_validation=true, @verify_ssl=true, @verify_ssl_host=true, @params_encoding=nil, @cert_file=nil, @key_file=nil, @debugging=false, @inject_format=false, @force_ending_format=false, @logger=#<Logger:0x000000013a887df0 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000013a887cb0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000013a887ad0 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000013a887a08>, @mon_data_owner_object_id=260>>> (NoMethodError)
        from /Users/iamwill/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/onesignal-1.0.0.beta1/lib/onesignal.rb:69:in `configure'
        from fun-with-onesignal.rb:6:in `<main>'

I inspected the configuration object code 👇🏾 and couldn't find any mention of access_token, so I used app_key. The README should be clarified and include all details needed to get a working example. Ideally, the getting started instructions have a code sample that works. It's not a great experience reading the source to figure out how to get this to work.

https://github.com/OneSignal/onesignal-ruby-client/blob/aa6601f850f71d9a272213dd1f721757a05d99b5/lib/onesignal/configuration.rb#L14-L115

[Bug]: Notification class missing `name` attribute

What happened?

When initializing a new Notification, the name attribute is missing. It's available in the Create Notification documentation.

Steps to reproduce?

  1. Install v1.0.1 of this library
  2. Initialize the API
one_signal_api = OneSignal::DefaultApi.new
  1. Initialize a new Notification with the following attributes:
notification = OneSignal::Notification.new({
  app_id: APP_ID,
  include_external_user_ids: ['SOME_EXTERNAL-USER-ID'],
  channel_for_external_user_ids: ["push"],
  headings: {en: 'TITLE'},
  contents: {en: 'BODY'},
  name: 'INTERNAL_CAMPAIGN_NAME'
})
  1. Send the notification
one_signal_api.create_notification(notification)

What did you expect to happen?

I expected the SDK to allow a Notification to include the name attribute, set to INTERNAL_CAMPAIGN_NAME.

Relevant log output

WARN: ArgumentError: `name` is not a valid attribute in `OneSignal::Notification`. Please check the name to make sure it's valid. List of attributes: [:included_segments, :excluded_segments, :last_session, :first_session, :session_count, :session_time, :amount_spent, :bought_sku, :tag, :language, :app_version, :location, :email, :country, :include_player_ids, :include_external_user_ids, :include_email_tokens, :include_phone_numbers, :include_ios_tokens, :include_wp_wns_uris, :include_amazon_reg_ids, :include_chrome_reg_ids, :include_chrome_web_reg_ids, :include_android_reg_ids, :id, :value, :aggregation, :is_ios, :is_android, :is_huawei, :is_any_web, :is_chrome_web, :is_firefox, :is_safari, :is_wp_wns, :is_adm, :is_chrome, :channel_for_external_user_ids, :app_id, :external_id, :contents, :headings, :subtitle, :data, :huawei_msg_type, :url, :web_url, :app_url, :ios_attachments, :template_id, :content_available, :mutable_content, :target_content_identifier, :big_picture, :huawei_big_picture, :adm_big_picture, :chrome_big_picture, :chrome_web_image, :buttons, :web_buttons, :ios_category, :android_channel_id, :huawei_channel_id, :existing_android_channel_id, :huawei_existing_channel_id, :android_background_layout, :small_icon, :huawei_small_icon, :large_icon, :huawei_large_icon, :adm_small_icon, :adm_large_icon, :chrome_web_icon, :chrome_web_badge, :firefox_icon, :chrome_icon, :ios_sound, :android_sound, :huawei_sound, :adm_sound, :wp_wns_sound, :android_led_color, :huawei_led_color, :android_accent_color, :huawei_accent_color, :android_visibility, :huawei_visibility, :ios_badge_type, :ios_badge_count, :collapse_id, :web_push_topic, :apns_alert, :send_after, :delayed_option, :delivery_time_of_day, :ttl, :priority, :apns_push_type_override, :throttle_rate_per_minute, :android_group, :android_group_message, :adm_group, :adm_group_message, :thread_id, :summary_arg, :summary_arg_count, :email_subject, :email_body, :email_from_name, :email_from_address, :sms_from, :sms_media_urls]
2022-08-02T20:21:17.039Z pid=56631 tid=26l3 WARN: /Users/damonbauer/.rvm/gems/ruby-2.7.5/gems/onesignal-1.0.1/lib/onesignal/models/notification.rb:653:in `block in initialize'

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Bug]: Crashes when used in a default rails/puma server on macOS

What happened?

When trying to send a notification, I get this:

objc[65540]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[65540]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

And no notifications are delivered

Steps to reproduce?

Trigger a notification from within puma, I guess

Root cause is:
https://github.com/typhoeus/typhoeus/issues/687
and
https://github.com/typhoeus/ethon/issues/206

But these are longstanding open issues. Perhaps Onesignal should reconsider using a library with a longstanding crash?

What did you expect to happen?

obvious

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Beta Version is not Loadable

Overview

It is my understanding that new API consumers are meant to be using the "beta 1.0.0" version of this library, however we've run into some issues loading it which I think are related to how the library is registered with RubyGems. Here is the guide we are following: https://github.com/OneSignal/onesignal-ruby-client/blob/aa5a0bea2fadf3f023d76de5f1492f25af3f7d34/README.md. After installing the gem, when trying to require it in our project in the boot-file (or in a console), we see the following error:

[1] pry(main)> require 'onesignal'
LoadError: cannot load such file -- onesignal
from /home/$USER/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'

Steps to Reproduce

Per the documentation, we've added the following to our Gemfile:

gem 'onesignal', '~> 1.0.0.beta1'

Then we run bundle, which appears to work and yields the following output:

Fetching onesignal 1.0.0.beta1 (was 0.3.0)
Installing onesignal 1.0.0.beta1 (was 0.3.0)

Then, either in a console or on application-startup, add the line require 'onesignal' and you should see the error above.

Temporary Fix

For the time being, we have found that we can work around this issue by specifying the git location and the git branch for the targeted beta release; the line in the Gemfile must be changed to:

gem 'onesignal', '~> 1.0.0.beta1', git: 'git://github.com/OneSignal/onesignal-ruby-client.git', branch: '1.0.0.beta1'

When running bundle with that in our Gemfile, we are able to use the library as expected:

[6] pry(main)> require 'onesignal'
=> false # Already required.
[8] pry(main)> OneSignal::DefaultApi
=> OneSignal::DefaultApi # Working as expected.

Summary

The temporary fix will give us access to the library in our project for now, but it is not an optimal solution. When targeting this branch bundle could begin failing if this branch were deleted from GitHub, or if the release were removed from the branch etc. In the short-term it would make sense to update the docs to reflect this usage, but long-term we would like to just target the gem version alone rather than listing the repository and branch as well.

[question]: Unclear behavior when not specifying is_android and is_ios flags

How can we help?

when I tried sending notifications to users who are subscribed on both Android and iOS platforms, I noticed that unless I explicitly set the is_android and is_ios flags, notifications weren't sent to my Android users.

OneSignal::Notification.new(
  app_id: ,
  contents: ,
  channel_for_external_user_ids: 'push',
  include_external_user_ids: ,
  app_url: ,
  ios_attachments: ,
  existing_android_channel_id: ,
  is_ios: true,    
  is_android: true 
)

documentation lists several flags like is_android, is_ios, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, and is_chrome as [optional]. However, the observed behavior suggests that we might need to specify them to ensure delivery. while these parameters are labeled as optional, do we essentially need to specify all of them to ensure the messages are delivered correctly?

The discrepancy between the documentation and the actual behavior has caused some confusion. Any clarification or guidance on this matter would be greatly appreciated.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Recommendations for docs improvement

I was able to get the client to work, but the docs need to be updated.

  • The getting started section of the project readme, states to call the access_token method when it should say app_key
  • It's not obvious which variables need to be changed, and I think the reason is that the instruction is formatted like a variable name, instead of a sentence, e.g.,
app_id = 'app_id_example' 

vs

app_id = 'APP ID EXAMPLE' # Change this to xyz

I think the latter makes it more evident what needs to change.

We could also explain what the code does to give an even stronger hint that they'll need to change stuff.

[Bug]: Ruby SDK does not support ios_interruption_level

What happened?

Try to use the ios_interruption_level property described here.

SDK throws an error when attempting to use it.

`ios_interruption_level` is not a valid attribute in `OneSignal::Notification`

Steps to reproduce?

1. Install 1.0.1 of library, the latest available on Ruby Gems
2. Attempt to use the create_notification method

What did you expect to happen?

I expected the library to send a push with the ios_interruption_level I passed in.

Relevant log output

`ios_interruption_level` is not a valid attribute in `OneSignal::Notification`. Please check the name to make sure it's valid. List of attributes: [:included_segments, :excluded_segments, :last_session, :first_session, :session_count, :session_time, :amount_spent, :bought_sku, :tag, :language, :app_version, :location, :email, :country, :include_player_ids, :include_external_user_ids, :include_email_tokens, :include_phone_numbers, :include_ios_tokens, :include_wp_wns_uris, :include_amazon_reg_ids, :include_chrome_reg_ids, :include_chrome_web_reg_ids, :include_android_reg_ids, :id, :value, :aggregation, :is_ios, :is_android, :is_huawei, :is_any_web, :is_chrome_web, :is_firefox, :is_safari, :is_wp_wns, :is_adm, :is_chrome, :channel_for_external_user_ids, :app_id, :external_id, :contents, :headings, :subtitle, :data, :huawei_msg_type, :url, :web_url, :app_url, :ios_attachments, :template_id, :content_available, :mutable_content, :target_content_identifier, :big_picture, :huawei_big_picture, :adm_big_picture, :chrome_big_picture, :chrome_web_image, :buttons, :web_buttons, :ios_category, :android_channel_id, :huawei_channel_id, :existing_android_channel_id, :huawei_existing_channel_id, :android_background_layout, :small_icon, :huawei_small_icon, :large_icon, :huawei_large_icon, :adm_small_icon, :adm_large_icon, :chrome_web_icon, :chrome_web_badge, :firefox_icon, :chrome_icon, :ios_sound, :android_sound, :huawei_sound, :adm_sound, :wp_wns_sound, :android_led_color, :huawei_led_color, :android_accent_color, :huawei_accent_color, :android_visibility, :huawei_visibility, :ios_badge_type, :ios_badge_count, :collapse_id, :web_push_topic, :apns_alert, :send_after, :delayed_option, :delivery_time_of_day, :ttl, :priority, :apns_push_type_override, :throttle_rate_per_minute, :android_group, :android_group_message, :adm_group, :adm_group_message, :thread_id, :summary_arg, :summary_arg_count, :email_subject, :email_body, :email_from_name, :email_from_address, :sms_from, :sms_media_urls]
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/onesignal-1.0.1/lib/onesignal/models/notification.rb:653:in `block in initialize'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/onesignal-1.0.1/lib/onesignal/models/notification.rb:651:in `each'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/onesignal-1.0.1/lib/onesignal/models/notification.rb:651:in `each_with_object'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/onesignal-1.0.1/lib/onesignal/models/notification.rb:651:in `initialize'
/Users/msencenb/Development/wrestling/app/notifications/notification.rb:147:in `new'
/Users/msencenb/Development/wrestling/app/notifications/notification.rb:147:in `build_onesignal_notification'
/Users/msencenb/Development/wrestling/app/notifications/new_message_notification.rb:64:in `to_onesignal'
/Users/msencenb/Development/wrestling/app/notifications/notification.rb:88:in `to_push'
/Users/msencenb/Development/wrestling/app/notifications/notification.rb:67:in `send_push'
/Users/msencenb/Development/wrestling/app/notifications/notification.rb:32:in `block in deliver'
/Users/msencenb/Development/wrestling/app/notifications/notification.rb:24:in `each'
/Users/msencenb/Development/wrestling/app/notifications/notification.rb:24:in `deliver'
/Users/msencenb/Development/wrestling/app/jobs/notify_job.rb:13:in `perform'
/Users/msencenb/Development/wrestling/app/jobs/application_job.rb:23:in `block in perform_now'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/i18n-1.12.0/lib/i18n.rb:322:in `with_locale'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `instance_exec'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `instance_exec'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/instrumentation.rb:21:in `block in instrument'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/appsignal-3.3.3/lib/appsignal/hooks/active_support_notifications.rb:19:in `block in instrument'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/appsignal-3.3.3/lib/appsignal/hooks/active_support_notifications.rb:18:in `instrument'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/instrumentation.rb:31:in `instrument'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/instrumentation.rb:14:in `block (2 levels) in <module:Instrumentation>'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `instance_exec'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/logging.rb:22:in `block in tag_logger'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/tagged_logging.rb:99:in `block in tagged'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/tagged_logging.rb:37:in `tagged'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/tagged_logging.rb:99:in `tagged'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/logging.rb:22:in `tag_logger'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/logging.rb:15:in `block (2 levels) in <module:Logging>'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `instance_exec'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:137:in `run_callbacks'
/Users/msencenb/Development/wrestling/app/jobs/application_job.rb:22:in `perform_now'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/execution.rb:25:in `block in execute'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/railtie.rb:47:in `block (4 levels) in <class:Railtie>'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/execution_wrapper.rb:91:in `wrap'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/reloader.rb:72:in `block in wrap'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/execution_wrapper.rb:91:in `wrap'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/reloader.rb:71:in `wrap'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/railtie.rb:46:in `block (3 levels) in <class:Railtie>'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `instance_exec'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:137:in `run_callbacks'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/execution.rb:23:in `execute'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/appsignal-3.3.3/lib/appsignal/hooks/active_job.rb:40:in `execute'
/Users/msencenb/.rvm/gems/ruby-3.0.5@wrestling/gems/activejob-6.1.7/lib/active_job/queue_adapters/resque_adapter.rb:47:in `perform'

Code of Conduct

  • I agree to follow this project's Code of Conduct

[question]: Identity Verification Public Key

How can we help?

I'm trying to use the fetch_user endpoint using an external ID. When performing the request I'm getting a 401 error code and the following error:

"The app is missing the Identity Verification public key. Please generate one in the dashboard"

I don't see any Identity Verification public key in the dashboard nor I see anything like that in the docs: https://documentation.onesignal.com/reference/view-user

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Bug]: Version 2 doesn't exist on rubygems

What happened?

Could not find gem 'onesignal (~> 2.0.2)' in rubygems repository https://rubygems.org/ or installed locally.

Steps to reproduce?

Try to install gem https://github.com/OneSignal/onesignal-ruby-api#installation

What did you expect to happen?

Gem installs

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Bug]: Unable to push notifications to users within segment

What happened?

I built the following sample app to push notifications to all users within a segment, but unfortunately, I was unable to get it to work.

require 'dotenv/load'
require 'time'
require 'onesignal'

rest_api_key = ENV['ONESIGNAL_REST_API_KEY']
app_id = ENV['ONESIGNAL_APP_ID']

OneSignal.configure do |config|
  config.app_key = rest_api_key
end

api_instance = OneSignal::DefaultApi.new

begin
  notification = OneSignal::Notification.new({ app_id: app_id })
  notification.contents = OneSignal::StringMap.new({ "en": 'English Message' })
  notification.included_segments = ['Include_segment']
  p notification

  notification_response = api_instance.create_notification(notification)
  notification_id = notification_response.id
  p notification_response
rescue OneSignal::ApiError => e
  puts "Error when calling DefaultApi->create_notification: #{e}"
end

FWIW, @jmadler and I did a little debugging to confirm that my segment did indeed have users who were subscribed to push, but still got the same error. I also tried several different apps and other segments and got the same results.

Steps to reproduce?

1. Change the `rest_api_key` and `app_id` to an app that makes use of segments
2. Run the script I shared
3. Note that you receive `All included players are not subscribed` as an error message

What did you expect to happen?

I expected a push notification to be sent to my device.

Relevant log output

#<OneSignal::Notification:0x00000001072d9440 @is_ios=true, @app_id="8152db8f-1417-48a4-b8db-264a744b87a3", @contents=#<OneSignal::StringMap:0x00000001072d9170 @en="English Message">, @included_segments=["Subscribed Users"]>
#<OneSignal::InlineResponse200:0x0000000107430bb8 @id="", @recipients=0, @errors=["All included players are not subscribed"]>

Code of Conduct

  • I agree to follow this project's Code of Conduct

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.