Giter VIP home page Giter VIP logo

lob-ruby's Introduction

lob-ruby-sdk

The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors.

This Ruby package is automatically generated by the OpenAPI Generator project:

  • API version: 1.3.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://support.lob.com/

Requirements

Ruby

Getting Started

Registration

First, you will need to first create an account at Lob.com and obtain your Test and Live API Keys.

Once you have created an account, you can access your API Keys from the Settings Panel.

Installation & Usage

Install with the appropriate package manager.

Then add Lob's Ruby SDK to your Gemfile

gem install 'lob'

First API Call

require 'lob'

config = Lob::Configuration.default
config.username = ENV['LOB_API_TEST_KEY']

apiInstance = Lob::AddressesApi.new
addressEditable = Lob::AddressEditable.new({
    description: "Harry - Office",
    name: "Harry Zhang",
    company: "Lob",
    email: "[email protected]",
    phone: "5555555555",
    address_line1: "2261 Market Street",
    address_line2: "Ste 5668",
    address_city: "San Francisco",
    address_state: "CA",
    address_zip: "94114",
    address_country: "US",
});

begin
  #create
  result = apiInstance.create(addressEditable)
  p result
rescue Lob::ApiError => e
  puts "Exception when calling AddressesApi->create: #{e}"
end

API Documentation

The full and comprehensive documentation of Lob's APIs is available here.

Testing

First, install RSpec to run the tests. This can be done by running either of the following lines on your command line depending on whether you use Bundler:

$ bundle add rspec # with Bundler

$ gem install rspec # without Bundler

Unit Tests

$ rspec -P __tests__/Api/* --color --format doc

Integration Tests

Integration tests run against a live deployment of the Lob API and require multiple valid API keys with access to specific features. As such, it is not expected that these tests will pass for every user in every environment.

To run integration tests:

$ LOB_API_TEST_KEY=<<YOUR TEST KEY>> LOB_API_LIVE_KEY=<<YOUR LIVE KEY>> rspec -P __tests__/Integration/* --color --format doc

A cleaner alternative if you are going to run integration tests frequently

Run this the first time:

$ echo "LOB_API_TEST_KEY=<<YOUR TEST KEY>> LOB_API_LIVE_KEY=<<YOUR LIVE KEY>>" > LOCAL.env

Then, to run the integration tests:

$ env $(cat LOCAL.env) rspec -P __tests__/Integration/* --color --format doc

=======================

Copyright © 2022 Lob.com

Released under the MIT License, which can be found in the repository in LICENSE.txt.

lob-ruby's People

Contributors

ajorczak-lob avatar ajpawlicki avatar amaan-lob avatar ami avatar amity avatar amrit avatar bennykitchell avatar bsiddiqui avatar drcapulet avatar elnaz avatar forbaokhanh avatar greysteil avatar harry-zhang avatar hashnuke avatar jackcallister avatar juanfriss avatar leore avatar mpiercy827 avatar mrkaspa avatar mwj8410 avatar nick-place-lob avatar pon avatar rafadc avatar richseviora avatar robinjoseph08 avatar russelltaylor05 avatar shrav avatar siddharthpant92 avatar sudoku-lord avatar zcpdog avatar

Stargazers

 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  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  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  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  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  avatar  avatar

lob-ruby's Issues

RestClient::UnprocessableEntity: 422 Unprocessable Entity

I am trying to create a postcard with front and back pdf that are locally generated. The files looks correct and here is the code.

  @lob = Lob()
  opts = {
    name: name,
    to: location_to
    from: location_from,
    front: File.new(front_path),
    back: File.new(back_path),
    full_bleed: 0
  }
  @lob.postcards.create(opts)

After debugging I see that the error is happening in this file at line lob.rb
JSON(RestClient.send(method, url, parameters))

The error response I get is below. Because there is a rescue around that method block this error is swallowed up and an Lob generic error message is shown:
RestClient::UnprocessableEntity: 422 Unprocessable Entity
from /Users/ankur/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in return!' from /Users/ankur/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/request.rb:230:inprocess_result'
from /Users/ankur/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in block in transmit' from /Users/ankur/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:853:instart'
from /Users/ankur/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in transmit' from /Users/ankur/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/request.rb:64:inexecute'
from /Users/ankur/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in execute' from /Users/ankur/.rvm/gems/ruby-2.1.1/gems/rest-client-1.6.7/lib/restclient.rb:72:inpost'
from (irb):19:in submit' from /Users/ankur/.rvm/gems/ruby-2.1.1/gems/lob-1.2/lib/lob/v1/postcard.rb:26:increate'
from .../app/models/message.rb:125:in `deliver'

Has anyone encountered this and know how to solve this. I am following the documentation to the spec and my code use to work. I am using the latest 1.2 version of the Gem with 1.6.7 version of rest-client

Ruby 3.0 Support

Add support for ruby 3.0. Drop support for ruby 2.4 if necessary

Getting Price After Creating Job

I have successfully created jobs using the following:

job = @lob.jobs.create( 
  from: {  ... },
  to: { ... },
  objects: objects )

The resulting job, when raised to_yaml, shows me a valid job with id, price, and all of the info I'm after. However, when I try to retrieve its price (or any other attribute) like so:

price = job[:price]

it returns with nothing. No errors but no price either, despite the fact that I know the price was showing up correctly when I was to_yaml'ing the job. I'm relatively new to rails so I'm certain it's something very basic that I'm missing, any help would be greatly appreciated. I have tried the following:

price = job["price"] # this returns an error saying that the key doesn't exist
price = job.price # again an error saying that the attribute doesn't exist
price = job[0][:price] # another error saying that there is no key for nil

I'm stumped. Thanks for the help.

Upgrade to rest-client 2.0

We're trying to upgrade our dependencies are held back to restclient 1.8 by lob-ruby. I looked and looks like there's nothing in 2 that would break you guys.

Rest Client Error

curl https://api.lob.com/v1/areas
-u xxxxx:
-d "name=123456789"
-d "front=https://lob.com/areafront.pdf"
-d "back=https://lob.com/areaback.pdf"
-d "routes=94104"
-d "target_type=residential"
-d "full_bleed=1"
{
"errors": [
{
"message": "Area mail requires a minimum of 1000 Addresses, you only have 513",
"status_code": 422
}
]
}

If that returns via the rest api, in the ruby gem, you get an error:
422 Unprocessable Entity (RestClient::UnprocessableEntity)

Long story short, better error handling.

Failing PDF tests

Looks like there is no spec/samples directory or PDF files in there so these tests are failing

  1. Error:
    test_0003_should be able to create jobs from a mix of remote and local files(Lob::V1::Job::create):
    Errno::ENOENT: No such file or directory - /Users/dc/code/ruby/src/lob-ruby/spec/samples/test.pdf
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/job_spec.rb:110:in initialize' /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/job_spec.rb:110:innew'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/job_spec.rb:110:in block (4 levels) in <top (required)>' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:incall'
    /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:in call_block' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr.rb:182:inuse_cassette'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/job_spec.rb:105:in block (3 levels) in <top (required)>' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1301:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:919:in block in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:inmap'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:inblock in _run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in map' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in_run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:867:in _run_anything' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1060:inrun_tests'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1047:in block in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:ineach'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1035:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:789:in `block in autorun'

  2. Error:
    test_0002_should create an object with file(Lob::V1::Object::create):
    Errno::ENOENT: No such file or directory - /Users/dc/code/ruby/src/lob-ruby/spec/samples/test.pdf
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/object_spec.rb:51:in initialize' /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/object_spec.rb:51:innew'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/object_spec.rb:51:in block (4 levels) in <top (required)>' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:incall'
    /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:in call_block' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr.rb:182:inuse_cassette'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/object_spec.rb:47:in block (3 levels) in <top (required)>' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1301:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:919:in block in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:inmap'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:inblock in _run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in map' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in_run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:867:in _run_anything' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1060:inrun_tests'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1047:in block in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:ineach'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1035:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:789:in `block in autorun'

  3. Error:
    test_0004_should create a postcard with front and back as PDFs(Lob::V1::Postcard::create):
    Errno::ENOENT: No such file or directory - /Users/dc/code/ruby/src/lob-ruby/spec/samples/postcardfront.pdf
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:99:in initialize' /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:99:innew'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:99:in block (4 levels) in <top (required)>' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:incall'
    /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:in call_block' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr.rb:182:inuse_cassette'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:93:in block (3 levels) in <top (required)>' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1301:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:919:in block in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:inmap'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:inblock in _run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in map' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in_run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:867:in _run_anything' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1060:inrun_tests'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1047:in block in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:ineach'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1035:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:789:in `block in autorun'

  4. Error:
    test_0001_should find a postcard(Lob::V1::Postcard::find):
    Errno::ENOENT: No such file or directory - /Users/dc/code/ruby/src/lob-ruby/spec/samples/postcardfront.pdf
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:118:in initialize' /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:118:innew'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:118:in block (4 levels) in <top (required)>' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:incall'
    /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:in call_block' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr.rb:182:inuse_cassette'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:112:in block (3 levels) in <top (required)>' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1301:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:919:in block in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:inmap'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:inblock in _run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in map' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in_run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:867:in _run_anything' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1060:inrun_tests'
    " ============================================================================
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1047:in block in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:ineach'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1035:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:789:in `block in autorun'

  5. Error:
    test_0001_should list postcards(Lob::V1::Postcard::list):
    Errno::ENOENT: No such file or directory - /Users/dc/code/ruby/src/lob-ruby/spec/samples/postcardfront.pdf
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:33:in initialize' /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:33:innew'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:33:in block (4 levels) in <top (required)>' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:incall'
    /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr/util/variable_args_block_caller.rb:9:in call_block' /Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/vcr-2.8.0/lib/vcr.rb:182:inuse_cassette'
    /Users/dc/code/ruby/src/lob-ruby/spec/lob/v1/postcard_spec.rb:27:in block (3 levels) in <top (required)>' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1301:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:919:in block in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:inmap'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:912:in _run_suite' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:inblock in _run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in map' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:899:in_run_suites'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:867:in _run_anything' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1060:inrun_tests'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1047:in block in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:ineach'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1046:in _run' /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:1035:inrun'
    /Users/dc/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:789:in `block in autorun'

49 tests, 45 assertions, 0 failures, 5 errors, 0 skips
rake aborted!
Command failed with status (1): [ruby -I"lib:lib:spec" -I"/Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib" "/Users/dc/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/rake_test_loader.rb" "spec/lob/v1/address_spec.rb" "spec/lob/v1/bank_account_spec.rb" "spec/lob/v1/check_spec.rb" "spec/lob/v1/country_spec.rb" "spec/lob/v1/job_spec.rb" "spec/lob/v1/object_spec.rb" "spec/lob/v1/packaging_spec.rb" "spec/lob/v1/postcard_spec.rb" "spec/lob/v1/resource_spec.rb" "spec/lob/v1/service_spec.rb" "spec/lob/v1/setting_spec.rb" "spec/lob_spec.rb" ]
/Users/dc/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in eval' /Users/dc/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in

'
Tasks: TOP => test
(See full trace by running task with --trace)

It is impossible to serialize response returned by Lob

Following code adds additional method on a Hash that is returned by Lob:
https://github.com/lob/lob-ruby/blob/master/lib/lob.rb#L42-L44

If I try to save that hash in a serialized encrypted column in DB I get following error:

TypeError: singleton can't be dumped
    from /app/vendor/bundle/ruby/2.3.0/gems/attr_encrypted-3.0.1/lib/attr_encrypted.rb:258:in `dump'
    from /app/vendor/bundle/ruby/2.3.0/gems/attr_encrypted-3.0.1/lib/attr_encrypted.rb:258:in `encrypt'
    from /app/vendor/bundle/ruby/2.3.0/gems/attr_encrypted-3.0.1/lib/attr_encrypted.rb:337:in `encrypt'
    from /app/vendor/bundle/ruby/2.3.0/gems/attr_encrypted-3.0.1/lib/attr_encrypted.rb:159:in `block (2 levels) in attr_encrypted'

Is it possible to remove the code that adds a method on the fly to the Hash?

Having some trouble running the specs

I'm running into a problem running the specs where the terminal window closes as soon as the tests finish running. It looks like most of the specs are failing, but I can't really see what the error is because the window closes too quickly for me to check.

I cloned the repository, bundled, then downloaded the sample files. There didn't appear to be any problems with any of these steps. I tried running "LOB_API_KEY=your_test_api_key bundle exec rake test" with my personal test api key, and that's when the error occurs.

I tried clearing out the cassettes so that real Lob.com API requests were made, and there was a noticeable difference in the run time, so I felt the tests were actually being ran. However, as soon as the tests ended, the terminal once again closed.

[V6] [letters.create] Trouble uploading PDF

I'm migrating from V5 to V6, and I'm having trouble uploading a PDF for the letters.create endpoint.

Specifically, when I pass in File.open("path-to-file.pdf") to the file argument of Lob::LetterEditable.new, the generated thumbnails in the Lob dashboard do add a page for the PDF, but it only contains a # character (see screenshot below).

Alternatives I have tried:

  • Passing just the local filename (not opening the file) -- yields "file must be a valid PDF or HTML file" (Lob::ApiError)
  • Passing File.read rather than File.open -- yields "source sequence is illegal/malformed utf-8" (JSON::GeneratorError)
    • (I also unsuccessfully tried various squish-to-valid-encodings methods from Ruby, but that doesn't feel like the right path)
  • Passing a variety of different input PDFs

Here is a minimal reproduction (just need to set LOB_API_KEY and ADDRESS_ID env vars):

#!/usr/bin/env ruby
require "lob"

config = Lob::Configuration.default
config.username = ENV.fetch("LOB_API_KEY")

api_client = Lob::ApiClient.new(config)
lob_letters = Lob::LettersApi.new(api_client)

pdf = File.open("tmp/input.pdf")

begin
  letter = Lob::LetterEditable.new({
    file: pdf,
    from: ENV.fetch("ADDRESS_ID"),
    to: ENV.fetch("ADDRESS_ID"),
    color: false,
    address_placement: "insert_blank_page",
    description: "Manual test script - PDF attachment issues"
  })

  puts lob_letters.create(letter).inspect
ensure
  pdf.close
end

And regardless of what file I use as tmp/input.pdf, this is the output in the Lob dashboard:

Screenshot 2023-03-02 at 9 51 59 AM

API for Bulk Printing,

Hi,

I understand that Lob tries to make the developers work easy, by providing an API that effortlessly sends out documents/postcards. But my question is how is that bulk printing service, wherin no where in the API it's mentioned that i can send an Array of "TO:" Addresses.

I wouldn't want to run a loop, and that would take forever. Instead, It should be accepting an Array of "TO:" Addresses, for a specified "Document"/"Object_ID"

So There should have been a call, This would have really made it a complete Bulk Mailing Service.

@lob.jobs.create(
  name: "New Cool Posters",
  from: "from-address-id",
  to: ["to-address-id-1","to-address-id-2",......"to-address-id-1000"]
  objects: "object-id"
)

Thanks,

Postcard Creation: cannot download file from URL / invalid byte sequence

I copied the source code for creating a postcard from the README and tried to send the back-file with File.read, cf. https://gist.github.com/iamwolf/1f4c59fecfa53178ec4f

When running this on ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.1], it fails with a message that it cannot download the file from URL (lob.rb:60). As I experienced an invalid byte sequence in UTF-8 error when using a PDF file generated with prawn, I downloaded the example file from http://lob.com/postcardback.pdf and run the above script. It fails with a "cannot download file from URL" error. Do you see any error with my attempt or is there a way to mitigate this issue?
Many thanks.

Invalid Regexps

Using this gem causes warnings:

***/gems/lob-6.0.5/lib/openapi_client/models/bank_account.rb:260: warning: character class has '-' without escape
***/gems/lob-6.0.5/lib/openapi_client/models/bank_account.rb:296: warning: character class has '-' without escape
***/gems/lob-6.0.5/lib/openapi_client/models/bank_account.rb:395: warning: character class has '-' without escape

Which in its turn causes Bootsnap to trip as well:

***/gems/bootsnap-1.16.0/lib/bootsnap/compile_cache/iseq.rb:49: warning: character class has '-' without escape
***/gems/bootsnap-1.16.0/lib/bootsnap/compile_cache/iseq.rb:49: warning: character class has '-' without escape
***/gems/bootsnap-1.16.0/lib/bootsnap/compile_cache/iseq.rb:49: warning: character class has '-' without escape

There are 2 PRs addressing this issue, and not a single word from Lob. :((

Consistency in documentation fromat

There are some places in the documentation where examples strings are used as arguments and others where the argument instructions are provided. In the example below "New Cool Posters" is an example string but "from-address-id," "to-address-id," etc are instructions for the expected argument. I think it would be better if the documentation was consistent in its format.

I'm happy to make a change for whichever is preferred (examples vs. argument instructions).

screenshot 2013-11-22 20 03 06

Mock requests with Webmock

Requests for local testing should be mocked out. Determine if integrated tests should still run in CI.

US Bulk Verifications API error - `Invalid ENUM value C1 for class #DpvFootnote`

Hello, we're using the US Address Verifications Bulk API Lob::UsVerificationsApi.new.verifyBulk and for certain errors, it raises a RuntimeError: Invalid ENUM value C1 for class #DpvFootnote

According to https://postalpro.usps.com/CASS_DPV_DSF2_RCFTNote_Possble, it looks like this is an issue with the secondary address field.

The primary number DPV confirmed; secondary information was present and did not confirm; secondary is required - C1

So I think what's happening is your API is returning a value of C1, which cannot be coerced to a valid DpvFootnote enum value in the gem.

Your docs do not list C1 as a DpvFootnote value: https://docs.lob.com/#tag/US-Verification-Types, but it appears it can be returned in the API.

It looks like C1 is missing here: https://github.com/lob/lob-ruby/blob/main/lib/openapi_client/models/dpv_footnote.rb#L21

Can this be added so this error can be handled properly without a runtime error? Thank you!

require 'lob' does not work

The documentation states that to get started one need only run:

gem install 'lob'
require 'lob'

This no longer seems to work after the 6.0.0 release, as there is no longer a lib/lob.rb file to require. I'm using rails 5.2.8.1, ruby 2.6.5p114 and trying to load lob looks something like this:

$ rails c
Loading development environment (Rails 5.2.8.1)
2.6.5 :001 > require 'lob'
Traceback (most recent call last):
        1: from (irb):1
LoadError (cannot load such file -- lob)
2.6.5 :002 > Lob
Traceback (most recent call last):
        2: from (irb):2
        1: from (irb):2:in `rescue in irb_binding'
NameError (uninitialized constant Lob)
2.6.5 :003 > require 'openapi_client'
 => true 
2.6.5 :004 > Lob

This could probably be solved by adding lib/lob.rb back to the project and making that require 'openapi_client'.

Various warnings when running tests and loading library

When I was running the tests for my last pull request I noticed a lot of warnings on my version of ruby. Most of them were along the lines of RegExp errors like:

lob-ruby/lib/openapi_client/models/thumbnail.rb:88: warning: character class has '-' without escape

Also saw one generated by the tests:

lob-ruby/__tests__/Api/Address.unit.rb:156: warning: already initialized constant DATE_FILTER
lob-ruby/__tests__/Api/BankAccount.unit.rb:158: warning: previous definition of DATE_FILTER was here

I should be able to clear up both and will submit a pull request. Since they're warnings and not really errors I can't think of any good tests to show them being fixed other than just fixing them. If you have any ideas of a way to test these (ie: a way to capture warnings in ruby and ensure they don't show up after the fix is applied), please let me know.

uninitialized constant Lob::Client on Rails 6

I have just added the Gem but I get this error.
Gemfile
gem 'lob'

Rails console

Loading development environment (Rails 6.0.0)
require 'lob'irb(main):001:0> require 'lob'
=> false
irb(main):002:0> @lob = Lob::Client.new(api_key: "test_XXXXX")
Traceback (most recent call last):
        1: from (irb):2
NameError (uninitialized constant Lob::Client)

Undefined method `=~' for [:ReturnEnvelope, :Boolean]:Array

I'm receiving the error in the title when sending a Letter. It seems that the problem is with attributes that are mapped to Open API type that is an Ruby Array.

In this error in particular return_envelope is mapped to Array[:ReturnEnvelope, :Boolean]:

:'return_envelope' => Array[:'ReturnEnvelope', :'Boolean'],

The second if in Letter#build_from_hash breaks because a =~ is sent to the array instance:

elsif type =~ /\AArray<(.*)>/i

Maybe the third if should precede the second one and add a check if type responds_to(:=~)? This problem should be present in all the implementations of build_form_hash of other model classes.

Thanks!

Tests failing - VCR does not know how to handle

I tried running

LOB_API_KEY=my_lob_api_key bundle exec rake test

and get 4 errors about "an HTTP request has been made that VCR does not know how to handle"

Am I doing something incorrectly or are the tests actually broken?

Having issue with reading HTTP headers for rate-limit

Using the API call @lob.letters.create. Letter gets successfully sent out but not getting HTTP headers for rate-limit

@lob.letters.create(
  description: "Demo Letter",
  to: {
    name: "Harry Zhang",
    address_line1: "123 Test Street",
    address_city: "Mountain View",
    address_state: "CA",
    address_country: "US",
    address_zip: "94041"
  },
  from: {
    name: "Ami Wang",
    address_line1: "123 Test Street",
    address_city: "Mountain View",
    address_state: "CA",
    address_country: "US",
    address_zip: "94041"
  },
  file: "<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>",
  data: {
    name: "Harry"
  },
  color: true
)

Returning 300 for address verification causes the gem to raise an exception

    lob.addresses.verify name: 'Russell Smith',
      address_line1: '673 Brannan',
      city: 'San Francisco',
      state: 'CA',
      zip: '94107'
RestClient::MultipleChoices: 300 Multiple Choices
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@p1z/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@p1z/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@p1z/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
    from /Users/russ/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:852:in `start'
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@p1z/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@btckyc/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@p1z/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@p1z/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@p1z/gems/lob-1.0.3/lib/lob.rb:41:in `submit'
    from /Users/russ/.rvm/gems/ruby-2.0.0-p247@p1z/gems/lob-1.0.3/lib/lob/v1/address.rb:11:in `verify'

screen shot 2013-09-21 at 2 37 06 pm

Lob 6.0.3: Various warnings when running tests and loading library

Lob 6.0.2 fixed a bunch of warnings, but these appear back in Lob 6.0.3:

warning: character class has '-' without escape

#209 has more info on the original fix.

You can see the regression here, amongst other lines:
v6.0.2...v6.0.3#diff-394b2cc6b345c7ebd5c1693dcd21d403a6c17b95200e382fe646878a708ce963R260

At minimum, I am seeing it here in our app:

        DEPRECATION WARNING: /Users/REDACTED/.rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/lob-6.0.3/lib/openapi_client/models/thumbnail.rb:118: warning: character class has '-' without escape
   
        DEPRECATION WARNING: /Users/REDACTED/.rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/lob-6.0.3/lib/openapi_client/models/thumbnail.rb:129: warning: character class has '-' without escape
   
        DEPRECATION WARNING: /Users/REDACTED/.rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/lob-6.0.3/lib/openapi_client/models/thumbnail.rb:140: warning: character class has '-' without escape
   
        DEPRECATION WARNING: /Users/REDACTED/.rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/lob-6.0.3/lib/openapi_client/models/letter.rb:498: warning: character class has '-' without escape

Bug when address is invalid?

Hello,

I have an issue where a properly-formatted FROM address works fine, but a bogus FROM address ends up crashing with:

NoMethodError:
       undefined method `each_byte' for nil:NilClass

The bogus address I was using (found this during testing trying to record a vcr cassette:

 {:name=>"Kangaroo Court",
 :address_line1=>"Bennelong Point",
 :address_line2=>"Shell 1",
 :city=>"Sydney",
 :state=>"MN",
 :country=>"US",
 :zip=>"55447"}

An address that works:

{:name=>"MPS",
 :address_line1=>"12450 Wayzata Blvd",
 :address_line2=>"Suite 200",
 :city=>"Minnetonka",
 :state=>"MN",
 :country=>"US",
 :zip=>"55305"}

Our Call (practically straight from the docs):

    response = @lob.letters.create(
      description: "Demo Letter",
      to: notification_recipient,
      from: courthouse_mail_origination_point,
      file: "https://s3-us-west-2.amazonaws.com/lob-assets/letter-goblue.pdf",
      color: true
    )

I feel strongly that the bogus address should be a properly trapped error and result in a 422 - Bad Request response.

Thanks & GO BADGERS!

Change object endpoint

This is on hold till the Lob API is updated but we'd like to change "Object" to something more descriptive

Requests to bulk US verifications are invalid.

I'm trying to make requests to the Bulk Verify endpoint https://docs.lob.com/#operation/bulk_us_verifications using this gem, but the requests end up wrong.

lob =
  Lob::Client.new(api_key: API_KEY)

addresses =
  [
    {
      'primary_line' => '323 Greenwich St Apt 5',
      'state' => 'NY',
      'city' => 'New York',
      'zip_code' => '10013'
    },
    {
     'primary_line' => '50 Riverside Blvd Apt 12B',
      'state' => 'NY',
      'city' => 'New York',
      'zip_code' => '10069'
    },
    {
      'primary_line' => '22 Christopher St',
      'state' => 'NY',
      'city' => 'New York',
      'zip_code' => '10014'
    },
    {
      'primary_line' => '45 West 67th Street Apt 33B',
      'state' => 'NY',
      'city' => 'New York',
      'zip_code' => '10023'
    }
  ]

response =
  lob.bulk_us_verifications.verify(addresses: addresses)

puts response # {"addresses"=>[{"error"=>{"message"=>"city must be a string", "status_code"=>422}}], "errors"=>true}

This is the request body that I see in the dashboard:

image

I'm guessing rest-client is at fault but couldn't debug it yet. If I'm doing something wrong let me know.

undefined method `config' for #<Lob::Configuration

I got this error when creating a postcard

/Users/xx/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/lob-6.0.5/lib/openapi_client/api/postcards_api.rb:40:in postcard_create_with_http_info': undefined method config' for #<Lob::Configuration:0x0000000113aef3d0 @scheme="https", @host="api.lob.com", @base_path="/v1", @server_index=0, @server_operation_index={}, @server_variables={}, @server_operation_variables={}, @api_key={}, @api_key_prefix={}, @client_side_validation=true, @verify_ssl=true, @verify_ssl_host=true, @cert_file=nil, @key_file=nil, @timeout=0, @params_encoding=nil, @debugging=false, @inject_format=false, @force_ending_format=false, @logger=#<ActiveSupport::BroadcastLogger:0x000000010eb8e570 @broadcasts=[#<ActiveSupport::Logger:0x00000001123ab4a8 @Level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000010ec44fa0 @datetime_format=nil>, @Formatter=#<ActiveSupport::Logger::SimpleFormatter:0x000000010ebc2528 @datetime_format=nil, @thread_key="activesupport_tagged_logging_tags:80540">, @logdev=#<Logger::LogDevice:0x00000001123aca88 @shift_period_suffix="%Y%m%d", @shift_size=1048576, @shift_age=0, @filename="/Users/xxx/Dropbox/dev/amzndata/log/development.log", @dev=#File:/Users/xxx/Dropbox/dev/amzndata/log/development.log, @binmode=false, @mon_data=#Monitor:0x000000010ec44b90, @mon_data_owner_object_id=67900>, @local_level_key=:logger_thread_safe_level_80520>, #<ActiveSupport::Logger:0x0000000114863890 @Level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x00000001148aca90 @datetime_format=nil>, @Formatter=#<ActiveSupport::Logger::SimpleFormatter:0x00000001148ac6f8 @datetime_format=nil>, @logdev=#<Logger::LogDevice:0x0000000114863750 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:>, @binmode=false, @mon_data=#Monitor:0x00000001148ac8b0, @mon_data_owner_object_id=94620>, @local_level_key=:logger_thread_safe_level_97800>], @progname="Broadcast", @Formatter=#<ActiveSupport::Logger::SimpleFormatter:0x000000010ebc2528 @datetime_format=nil, @thread_key="activesupport_tagged_logging_tags:80540">>, @username="test_78e71c7c1218d12670845d0546ce2c595e4"> (NoMethodError)

  if @api_client.config.debugging
                ^^^^^^^

Did you mean? configure

postcardCreate = Lob::PostcardEditable.new({
      description: "Demo Postcard job",
      from: "adr_XXXXX",
      use_type: "marketing",
      front: "https://xxxx-postcard.s3.amazonaws.com/front.pdf",
      back: "https://xxx-postcard.s3.amazonaws.com/back.pdf",
      to: Lob::AddressEditable.new({
        name: "#{self.company} - #{self.name}",
        address_line1: self.line1,
        address_line2: self.line2,
        address_city: self.city,
        address_state: self.state,
        address_zip: self.postal_code,
      }),
    })

    config = Lob::Configuration.default
    config.username = 'test_XXXXXX'

    postcardApi = Lob::PostcardsApi.new(config)
    createdPostcard = postcardApi.create(postcardCreate)
    createdPostcard

This object correctly exists and prints my secret_key

config = Lob::Configuration.default
config.username

but If I try to call config.config() it doesn't esists the method.

From the offical doc it's not clear where "config" came from.
Screenshot 2024-02-07 at 11 36 05

Address verification shouldn't require the state and the city

I see from the gem code that you always require all the info about an address (street, city, zip, country, state). But your api works even when the city and state aren't provided, since the important one is the zip.

We use lob to validate our customer's addresses, but also to fetch their states in order to avoid having them to select them, since we already ask for all the other data, but cannot do this at the moment because you also require the state

Why do some methods accept args rather than everything in a hash?

To create some services (postcards for example) the name and address_id are accepted as regular args rather than inside a hash.

postcard = @lob.postcards.create(
      name,
      address_id,
      message: message
    )

I'd like to say:

postcard = @lob.postcards.create(
      name: name,
      address_id: address_id,
      message: message
    )

It looks clearer and more concise.

def create(options = {})
  if options[:to] && !options[:to].is_a?(String)
    options[:to] = @resource.format_address_params(options[:to])
  end

  if options[:from] && !options[:from].is_a?(String)
    options[:from] = @resource.format_address_params(options[:from])
  end

  Lob.submit :post, postcard_url, options
end

I'd be happy to make this change across the board, let me know what you think.

Can't retrieve letters if they have tracking events

Hi! i'm having trouble retrieving letters using the Lob::LettersApi#get method.

Steps to reproduce. Like in the docs:

Lob.configure do |config|
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = Lob::LettersApi.new
ltr_id = 'ltr_id_example' # Id of a letter with at least one tracking event

begin
  result = api_instance.get(ltr_id)
  p result
rescue Lob::ApiError => e
  puts "Error when calling LettersApi->get: #{e}"
end

Result:

Traceback (most recent call last):
./lib/ruby/gems/2.7.0/gems/lob-6.0.2/lib/openapi_client/models/letter.rb:542:in `tracking_events=': invalid value for "tracking_events", number of items must be less than or equal to 0. (ArgumentError)

I've tried to use the configuration option client_side_validation but the result was the same.

I'm using lob gem version 6.0.2 on ruby 2.7.7.

Thanks!

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.