transparencia_alagoas 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 160e1f34b23f4ba27d13b7478269ad428af042bc
4
- data.tar.gz: ce40bb4387130de3817fce8cd709e0ee60ee8c57
3
+ metadata.gz: e88f96bab7c985930b85972a8f7ce0738f74285e
4
+ data.tar.gz: 8865c55d27000977f0cc07161e7205af22b34375
5
5
  SHA512:
6
- metadata.gz: c695aa2414cfb41783288108986bbc82510d22d1abf8cd29dfec66f72c6d52762ca26e7e29d072915e8ceb18596eb2f41df4d2135dc4d2b8290088c45fae2b3b
7
- data.tar.gz: a979fef767adaaf94bdcc0b801b84dad71225d737bf0cd0ed7622302e013bae02b310732354667059d25766a965f110a6f48f4971b894ba4691a20d4223753df
6
+ metadata.gz: 0b132428c115ff9b28af4a7a8f5bce0741740a64ff517f334e0a96334ee9ef9ee34aab6e1cfc72c87aff756c24a845c3d4ce761f902f3d85d1010562e1f72481
7
+ data.tar.gz: cc568697f9f317822db467c8c51268acc89b6053b9340c1807df637d6f64820143a27acc75e913c8e58749eb312d2903844ed7670f4c94fc29bdcce1cdf95e7b
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # TransparenciaAlagoas
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/transparencia_alagoas`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This gem aims to facilitating access to the "Portal da Transparência (http://transparencia.al.gov.br)" of the state of Alagoas. It abstracts the access to this portal data that is provided through a REST API.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,164 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ This Gem are not covering the whole API yet. For while we provide the resources of servants, biddings and patrimony. There a class responsible for each one of this resources.
24
+
25
+ Take a look at some examples:
26
+
27
+ ```ruby
28
+ # encoding: utf-8
29
+
30
+ require 'transparencia_alagoas'
31
+
32
+ # Get active servant that received some money on month 8 of year 2016
33
+ # If month and/or year are not provided we'll use the current month and/or year
34
+ active_servants = TransparenciaAlagoas::Servant.active_servants(month:8, year:2016)
35
+ puts active_servants
36
+ ```
37
+
38
+ We can pass any of the options available in the REST API, for example:
39
+
40
+ ```ruby
41
+ # encoding: utf-8
42
+
43
+ require 'transparencia_alagoas'
44
+
45
+ # We can get a list of materials from state patrimony filtered by material name
46
+ materials = TransparenciaAlagoas::Patrimony.material_detail(ug_code: 250505, material: "WINDOWS 7 OEM STARTER 32 B MICROSOFT")
47
+ puts materials
48
+ ```
49
+
50
+ Is also possible to access data from Biddings:
51
+
52
+ ```ruby
53
+ # encoding: utf-8
54
+
55
+ require 'transparencia_alagoas'
56
+
57
+ biddings = TransparenciaAlagoas::Bidding.get(qty:10, offset:10, options: {"start_date": "2016-11-01", :orgao_licitante => "ITEC"})
58
+ puts biddings
59
+ ```
60
+
61
+ To have more details about Portal da Transparência API please take a look on this [documentation](http://transparencia.al.gov.br/portal/api).
62
+
63
+ ## Classes and Methods Available
64
+
65
+ ### Class Bidding
66
+
67
+ #### Method: get(qty: 10, offset: 0, options: {})
68
+
69
+ *Available Options:*
70
+
71
+ PARAM | TYPE | DESCRIPTION
72
+ ------|------|-------------
73
+ data_realizacao_dti_ | Date | Seta a data inicial que será realizada a consulta. (dd/mm/yyyy)
74
+ data_realizacao_dtf_ | Date | Seta a data final que será realizada a consulta. (dd/mm/yyyy)
75
+ modalidade | text | Filtra pela modalidade entre os retornados na consulta.
76
+ orgao_licitante | text | Filtra pelo órgão licitante entre os retornados na consulta.
77
+ status (situação) | text | Filtra pela situação entre os retornados na consulta. Valores: Aberta / Encerrada
78
+ sort | text | Define o campo o qual será ordenada a consulta.
79
+ order | text | Define a ordem que será ordenada a consulta. Valores: asc / desc
80
+
81
+ ### Class Patrimony
82
+
83
+ #### Method: property_list(qty: 10, offset: 0, options: {})
84
+
85
+ *Available Options*
86
+
87
+ PARAM | TYPE | DESCRIPTION
88
+ ------|------|-------------
89
+ municipio | text | Filtra pelo nome do município entre os retornados na consulta.
90
+ denominacao | text | Filtra pelo nome do imóvel (ao que é atribuído) entre os retornados na consulta.
91
+ situacao_ocupacao | text | Filtra pela situação do imóvel entre os retornados na consulta.
92
+ sort | text | Define o campo o qual será ordenada a consulta.
93
+ order | text | Define a ordem que será ordenada a consulta. Valores: asc / desc
94
+
95
+ #### Method: ug_list(qty: 10, offset: 0, options: {})
96
+
97
+ *Available Options*
98
+
99
+ PARAM | TYPE | DESCRIPTION
100
+ ------|------|-------------
101
+ descricao_ug | text | Filtra pelo nome da unidade gestora entre os retornados na consulta.
102
+ sort | text | Define o campo o qual será ordenada a consulta.
103
+ order | text | Define a ordem que será ordenada a consulta. Valores: asc / desc
104
+
105
+ #### Method: materials_list(qty: 10, offset: 0, ug_code: nil, options: {})
106
+
107
+ *Available Options*
108
+
109
+ PARAM | TYPE | DESCRIPTION
110
+ ------|------|-------------
111
+ codigo_ug | integer | Define por qual unidade gestora será filtrada a consulta de materiais.
112
+ descricao_conta | text | Filtra pelo subelemento entre os retornados na consulta.
113
+ material | text | Filtra pelo nome do material entre os retornados na consulta.
114
+ sort | text | Define o campo o qual será ordenada a consulta.
115
+ order | text | Define a ordem que será ordenada a consulta. Valores: asc / desc
116
+
117
+ #### Method: material_detail(qty: 10, offset: 0, ug_code: nil, material: nil, options: {})
118
+
119
+ *Available Options*
120
+
121
+ PARAM | TYPE | DESCRIPTION
122
+ ------|------|-------------
123
+ codigo_ug | integer | Define por qual unidade gestora será filtrada a consulta de materiais.
124
+ material | text | Define qual material será detalhado. (nome do material)
125
+ patrimonio | text | Filtra pelo número do patrimônio entre os retornados na consulta.
126
+ codigo_antigo | text | Filtra pelo código antigo entre os retornados na consulta.
127
+ sort | text | Define o campo o qual será ordenada a consulta.
128
+ order | text | Define a ordem que será ordenada a consulta. Valores: asc / desc
129
+
130
+
131
+ ### Class Servant
132
+
133
+ #### Method: active_servants(qty: 10, offset: 0, month: nil, year: nil, options: {})
134
+
135
+ *Available Options*
136
+
137
+ PARAM | TYPE | DESCRIPTION
138
+ ------|------|-------------
139
+ month | integer | Seta o mês que será realizado a consulta. (mm)
140
+ year | integer | Seta o ano que será realizado a consulta. (aaaa)
141
+ nome | text | Filtra pelo nome do servidor entre os retornados na consulta.
142
+ codigo_orgao | integer | Filtra pelo código do órgão entre os retornados na consulta.
143
+ sort | text | Define o campo o qual será ordenada a consulta.
144
+ order | text | Define a ordem que será ordenada a consulta. Valores: asc / desc
145
+
146
+ #### Method: detail_active_servant(qty: 10, offset: 0, servant_id: nil, options: {})
147
+
148
+ *Available Options*
149
+
150
+ PARAM | TYPE | DESCRIPTION
151
+ ------|------|-------------
152
+ servant_id | integer | Decide por qual servidor será detalhada a consulta.
153
+ ano | integer | Filtra pelo ano entre os retornados na consulta.
154
+ sort | text | Define o campo o qual será ordenada a consulta.
155
+ order | text | Define a ordem que será ordenada a consulta. Valores: asc / desc
156
+
157
+
158
+ #### Method: inactive_servants(qty: 10, offset: 0, month: nil, year: nil, options: {})
159
+
160
+ *Available Options*
161
+
162
+ PARAM | TYPE | DESCRIPTION
163
+ ------|------|-------------
164
+ month | integer | Seta o mês que será realizado a consulta. (mm)
165
+ year | integer | Seta o ano que será realizado a consulta. (aaaa)
166
+ nome | text | Filtra pelo nome do servidor entre os retornados na consulta.
167
+ vinculo | integer | Filtra pelo vínculo entre os retornados na consulta. (Valores: Aposentado / Pensionista)
168
+ sort | text | Define o campo o qual será ordenada a consulta.
169
+ order | text | Define a ordem que será ordenada a consulta. (Valores: asc / desc)
170
+
171
+ #### Method: detail_inactive_servant(qty: 10, offset: 0, servant_id: nil, options: {})
172
+
173
+ *Available Options*
174
+
175
+ PARAM | TYPE | DESCRIPTION
176
+ ------|------|-------------
177
+ servant_id | integer | Define por qual servidor inativo será filtrada a consulta.
178
+ ano | integer | Filtra pelo ano entre os retornados na consulta.
179
+ sort | text | Define o campo o qual será ordenada a consulta.
180
+ order | text | Define a ordem que será ordenada a consulta. (Valores: asc / desc)
26
181
 
27
182
  ## Development
28
183
 
@@ -32,5 +187,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
187
 
33
188
  ## Contributing
34
189
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/transparencia_alagoas. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
190
+ Bug reports and pull requests are welcome on GitHub at https://github.com/nandooliveira/transparencia_alagoas. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
191
 
@@ -1,3 +1,3 @@
1
1
  module TransparenciaAlagoas
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transparencia_alagoas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Oliveira