All Projects → prodis → Correios Sro Xml

prodis / Correios Sro Xml

Tracking Objects System from Correios - SRO (Sistema de Rastreamento de Objetos dos Correios)

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Correios Sro Xml

Map Matching
The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
Stars: ✭ 665 (+1978.13%)
Mutual labels:  tracking
Umbraco Nexu
Umbraco package that let's you track internal links in Umbraco
Stars: ✭ 18 (-43.75%)
Mutual labels:  tracking
Indian Courier Api
API to track parcel from various Indian Logistics Providers
Stars: ✭ 26 (-18.75%)
Mutual labels:  tracking
Hblock
Improve your security and privacy by blocking ads, tracking and malware domains.
Stars: ✭ 724 (+2162.5%)
Mutual labels:  tracking
Pyamplitude
A Python connector for Amplitude Analytics
Stars: ✭ 16 (-50%)
Mutual labels:  tracking
Mixpanel Android
Official Mixpanel Android SDK
Stars: ✭ 907 (+2734.38%)
Mutual labels:  tracking
Siamdw
[CVPR'19 Oral] Deeper and Wider Siamese Networks for Real-Time Visual Tracking
Stars: ✭ 635 (+1884.38%)
Mutual labels:  tracking
Aurelia Google Analytics
An Aurelia.io plugin that adds Google Analytics page tracking to your project.
Stars: ✭ 28 (-12.5%)
Mutual labels:  tracking
Find Lf
Track the location of every Wi-Fi device (📱) in your house using Raspberry Pis and FIND
Stars: ✭ 893 (+2690.63%)
Mutual labels:  tracking
Norfair
Lightweight Python library for adding real-time 2D object tracking to any detector.
Stars: ✭ 933 (+2815.63%)
Mutual labels:  tracking
Trape
People tracker on the Internet: OSINT analysis and research tool by Jose Pino
Stars: ✭ 6,753 (+21003.13%)
Mutual labels:  tracking
Jeelizweboji
JavaScript/WebGL real-time face tracking and expression detection library. Build your own emoticons animated in real time in the browser! SVG and THREE.js integration demos are provided.
Stars: ✭ 835 (+2509.38%)
Mutual labels:  tracking
Media Tracker
Self-hosted open source media-tracker for tv shows and movies. (React, Redux)
Stars: ✭ 21 (-34.37%)
Mutual labels:  tracking
Rotki
A portfolio tracking, analytics, accounting and tax reporting application that protects your privacy
Stars: ✭ 689 (+2053.13%)
Mutual labels:  tracking
Sro
Friendly Correios SRO API wrapper and command-line utility
Stars: ✭ 7 (-78.12%)
Mutual labels:  tracking
Vpp
Video++, a C++14 high performance video and image processing library.
Stars: ✭ 655 (+1946.88%)
Mutual labels:  tracking
Parse Auditor
Audit module for Parse Platform
Stars: ✭ 19 (-40.62%)
Mutual labels:  tracking
Toodles
Project management directly from the TODOs in your codebase
Stars: ✭ 963 (+2909.38%)
Mutual labels:  tracking
.net Demo
快递100,接口,API,快递100免费接口,快递查询接口,快递查询接口,快递100 api,快递100 api接口,快递100接口,快递查询api,快递查询api 免费,快递api,快递接口,接口,API,查询,快递查询,快递信息推送,实时快递查询,云打印,电子面单,商家寄件,C端寄件
Stars: ✭ 28 (-12.5%)
Mutual labels:  tracking
Doc Hunt
Keep your documentation up to date by tracking changes in your source code
Stars: ✭ 24 (-25%)
Mutual labels:  tracking

= correios-sro-xml

Tracking Objects System from Correios - SRO (Sistema de Rastreamento de Objetos dos Correios), using SRO XML Web Service, that allows to query up to 50 orders simultaneously.

http://prodis.net.br/images/ruby/2011/correios_logo.png

{Gem Version}[http://badge.fury.io/rb/correios-sro-xml] {Build Status}[https://travis-ci.org/prodis/correios-sro-xml] {Coverage Status}[https://coveralls.io/r/prodis/correios-sro-xml] {Code Climate}[https://codeclimate.com/github/prodis/correios-sro-xml] {Dependency Status}[https://gemnasium.com/prodis/correios-sro-xml]

== Warning Previous versions of version 0.4.0 don't work anymore. See issue #4 for more details.

In order to use SRO XML in production environment, it is necessary to request to Correios access data (user and password) for your company, as described in {Correios' Blog}[http://blog.correios.com.br/comercioeletronico/?p=218].

For development environment you can use follow access data: user: ECT password: SRO

== Installing

=== Gemfile gem 'correios-sro-xml'

=== Direct installation $ gem install correios-sro-xml

== Using

require 'correios-sro-xml'

sro = Correios::SRO::Tracker.new(user: "ECT", password: "SRO")

Tracking a single object: object = sro.get("SI047624825BR") object.number # => "SI047624825BR" object.events.first.date # => "26/12/2011" object.events.first.hour # => "15:22" object.events.first.place # => "AC CENTRAL DE SAO PAULO" object.events.first.description # => "Entregue"

Tracking many objects: objects = sro.get("SI047624825BR", "SX104110463BR")

objects["SI047624825BR"].number # => "SI047624825BR" objects["SI047624825BR"].events.first.date # => "26/12/2011" objects["SI047624825BR"].events.first.hour # => "15:22" objects["SI047624825BR"].events.first.place # => "AC CENTRAL DE SAO PAULO" objects["SI047624825BR"].events.first.description # => "Entregue"

objects["SX104110463BR"].number # => "SX104110463BR" objects["SX104110463BR"].events.first.date # => "08/12/2011" objects["SX104110463BR"].events.first.hour # => "09:30" objects["SX104110463BR"].events.first.place # => "CEE JUNDIAI" objects["SX104110463BR"].events.first.description # => "Entregue"

=== Tracker result mode

One object can have one or more events. For default, the tracker result mode will be return the last object event. sro.result_mode # => :last

object = sro.get("SI047624825BR") object.events.size # => 1

You can configure to return all events in the object. sro.result_mode = :all

object = sro.get("SI047624825BR") object.events.size # => 5

=== Tracker query type

There are two ways to query objects in tracker:

==== List of objects Where all the object numbers will be requested (the default). sro.query_type # => :list

objects = sro.get("PB996681660BR", "PB996681700BR") objects.keys # => ["PB996681660BR", "PB996681700BR"]

==== Range of objects In which you supplie the first and last objects numbers of an interval. sro.query_type = :range

objects = sro.get("PB996681660BR", "PB996681700BR") objects.keys # => ["PB996681660BR", "PB996681673BR", "PB996681687BR", "PB996681695BR", "PB996681700BR"]

== Configurations

Use Correios::SRO module to set all available gem configuration.

=== Access data

You can supply SRO XML Web Service user and password in configuration instead of each instance of Correios::SRO::Tracker class. Correios::SRO.configure do |config| config.user = "ECT" config.password = "SRO" end

=== Timeout

For default, the timeout for a request to SRO XML Web Service is 5 seconds. If SRO XML Web Service does not respond, a Timeout::Error exception will be raised. Correios::SRO.configure do |config| config.request_timeout = 3 # It configures timeout to 3 seconds end

=== Log

For default, each request to SRO XML Web service is logged to STDOUT, with :info log level, using the gem {LogMe}[http://github.com/prodis/log-me].

Log example: I, [2012-08-17T00:55:10.531780 #22692] INFO -- : [Correios::SRO] Request: POST http://websro.correios.com.br/sro_bin/sroii_xml.eventos Usuario=ECT&Senha=SRO&Tipo=L&Resultado=U&Objetos=PB996681660BR

I, [2012-08-17T00:55:10.750308 #22692] INFO -- : [Correios::SRO] Response: HTTP/1.1 200 OK

1.0 1 Lista de Objetos Último evento PB996681660BR BDE 01 05/07/2012 21:11 Entregue CDD VILA ANDRADE 05724970 SAO PAULO SP 72824000

You can disable the log and configure other log output. Correios::SRO.configure do |config| config.log_enabled = false # It disables the log config.logger = Rails.logger # It uses Rails logger end

=== Configuration example

Correios::SRO.configure do |config| config.user = "ECT" config.password = "SRO" config.logger = Rails.logger config.request_timeout = 3 end

== Author

  • {Fernando Hamasaki de Amorim (prodis)}[http://prodis.blog.br]

== Collaborators

  • {Lennon Manchester (lemanchester)}[https://github.com/lemanchester]
  • {Rinaldi Fonseca (rinaldifonseca)}[https://github.com/rinaldifonseca]
  • {Thiago Ganzarolli (tganzarolli)}[https://github.com/tganzarolli]

== Contributing to correios-sro-xml

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Don't forget to rebase with branch master in main project before submit the pull request.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

== Copyright

(The MIT License)

{Prodis a.k.a. Fernando Hamasaki}[http://prodis.blog.br]

http://prodis.net.br/images/prodis_150.gif

Copyright (c) 2012-2014 Prodis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].