Skip to content

Commit

Permalink
Basic usage in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Nu-hin committed Feb 28, 2014
1 parent 24e555c commit b46edec
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
# Pickpoint API

## Description

This gem provides a basic wrapper over [Pickpoint](http://pickpoint.ru/) API.

## Usage

```ruby
require('pickpoint_api')

PickpointApi.session('login', 'password', test: true) do |s|
postamats = s.postamats

s.create_sending(@my_sending_hash)

tracking_response = s.track_sending(@invoice_id_1)

labels_response_pdf = s.make_label([@invoice_id_1, @invoice_id_2])

reestr_response_pdf = s.make_reestr([@invoice_id_1, @invoice_id_2])

end
```

Alternatively, you can create a Session object explicitly:

```ruby
require ('pickpoint_api')

session = PickpointApi.session.new(test: true)
session.login('login','password')
tracking_response = session.track_sending(@invoice_id_1)
session.close
```

0 comments on commit b46edec

Please sign in to comment.