Coder Social home page Coder Social logo

emarsys-rb's People

Contributors

aleknak avatar boogie avatar carpodaster avatar dansch avatar hats avatar headshota avatar jack12816 avatar jacobrastad avatar jhermsmeier avatar maciekziol avatar mdudzinski avatar michaelsauter avatar mungler avatar mwallba avatar ptrykov avatar sliminas avatar spajic avatar

Stargazers

 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

emarsys-rb's Issues

Wrong exception type raised on error 500

Received the following exception during Emarsys::Contact.update_batch

Emarsys::BadRequest
errorHTTP-Code: 500, Emarsys-Code: 1 - Database connection failed: timeout

Seems like it should be Emarsys::InternalServerError instead of Emarsys::BadRequest that should be raised right?

Gem version (0.3.3)

Timeouts

I noticed that there are no timeouts set so by default requests time out after 60s. It would be nice to configure this.

I thought about adding timeout options to the config, and then using the lower-level method RestClient::Request.execute(method: method, url: url, open_timeout: open_timeout, read_timeout: read_timeout).

Would you be willing to merge this? Then I'll wrap up a PR.

Broken authorization

This commit: #9 breaks authorization for me.
I get Emarsys::Unauthorized: HTTP-Code: 401, Emarsys-Code: 1 - Unauthorized Time frame is invalid

Does it work for anyone? What's the point?

emarsys call taking lots of time

Hi

Is there any way to reduce the emarsys get and post call as it consume lots of time due to that application performance impacted even we put it into background?

`Emarsys.configure` not working

When I call:

require 'emarsys'
Emarsys.configure do |c|
  c.api_username = ENV['EMARSYS_USERNAME']
  c.api_password = ENV['EMARSYS_PASSWORD']
  c.api_endpoint = ENV['EMARSYS_API_URL'] || 'https://api.emarsys.net/api/v2'
end

And then run a test command like Emarsys::Contact.search('3',['[email protected]']) it gives me an error saying Emarsys.api_username is not set. Am I missing something here?!?

Rate limiting headers

In regards to #21, I was wondering how to expose the headers. Right now I see 2 issues:

  1. I don't even get the headers from Emarsys as promised in http://documentation.emarsys.com/resource/developers/getting-started/rate-limiting/. response.headers is:
{:date=>"Wed, 01 Mar 2017 11:13:18 GMT",
 :server=>"Apache",
 :strict_transport_security=>"max-age=15552000; includeSubDomains; preload",
 :x_suite_response_time=>"53",
 :vary=>"Accept-Encoding",
 :content_encoding=>"gzip",
 :content_length=>"72",
 :content_type=>"text/html; charset=utf-8"}
  1. Emarsys::Request always returns Emarsys::Response.new(response).result, so there is no way to access the response. I wonder if it would make sense to change this to return the response and not the data.

Any thoughts?

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.