Todos los requests deben ser realizandos enviando API_KEY via GET
GET /schools
Todos los requests deben ser realizandos enviando API_KEY via GET
GET /schools
| c_cyan=`tput setaf 6` | |
| c_red=`tput setaf 1` | |
| c_green=`tput setaf 2` | |
| c_sgr0=`tput sgr0` | |
| parse_git_branch () | |
| { | |
| if git rev-parse --git-dir >/dev/null 2>&1 | |
| then | |
| gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') |
| heroku create $1 | |
| heroku addons:add pgbackups:auto-month | |
| heroku addons:add custom_domains:basic | |
| heroku addons:add zerigo_dns:basic | |
| heroku addons:add newrelic:standard | |
| heroku addons:upgrade logging:expanded |
| .idea/ |
| # pero agregué este spec en contacts y pasa | |
| # así que debe ser algo de como CRm esta creando el contact,no? | |
| it "should allow access to contacts" do | |
| l = List.make | |
| a = l.account | |
| c = Contact.make(:lists => [l]) | |
| l.reload | |
| l.contacts.should == [c] | |
| a.lists.first.contacts.should == [c] | |
| end |
| # In CONTACTS WS | |
| # V0::ContactsController | |
| # POST create | |
| # if it recieves image | |
| # should store it on amazon and link it to contact | |
| # PUT update | |
| # if it recieves image | |
| # should store it on amazon and link it to contact | |
| # should delete previous image | |
| # DELETE destroy |
| class Search | |
| include Mongoid::Document | |
| field :query, :type => Hash | |
| field :collection | |
| embedded_in :user | |
| def to_criteria | |
| Mongoid::Criteria.new( collection.titleize.constantize ).fuse( query ) |
| class CommunicationSearch < Search | |
| attr_accessor :full_name | |
| def results(base = nil) | |
| if self.full_name.present? | |
| contacts = PadmaContact.paginate :where => { :full_name => self.full_name }, :per_page => 999999 | |
| base = base.where(:contact_id => contacts.map(&:id)) | |
| end | |
| ... | |
| base |
| require 'typhoeus/arrays_decoder' | |
| class ApplicationController < ActionController::Base | |
| protect_from_forgery | |
| before_filter :decode_typhoeus_arrays | |
| private | |
| def decode_typhoeus_arrays |
| 2012-12-11T13:33:52+00:00 app[web.1]: | |
| 2012-12-11T13:33:52+00:00 app[web.1]: | |
| 2012-12-11T13:33:52+00:00 app[web.1]: Started GET "/v0/contacts?per%5Fpage=1000&where%5Blocal%5Fstatus%5Ffor%5Fmatosinhos%5D=student&where%5Bglobal%5Fteacher%5Fusername%5D=pedro%2Emar&page=1&app%5Fkey=844d8c2d20a9cf9e97086df94f01e7bdd3d9afaa716055315706f2e31f40dc097c632af53e74ce3d5a1f23811b4e32e7a1e2b7fa5c128c8b28f1fc6e5a392015" for 50.16.118.56 at 2012-12-11 13:33:52 +0000 | |
| 2012-12-11T13:33:52+00:00 app[web.1]: Processing by V0::ContactsController#index as */* | |
| 2012-12-11T13:33:52+00:00 app[web.1]: Parameters: {"per_page"=>"1000", "where"=>{"local_status_for_matosinhos"=>"student", "global_teacher_username"=>"pedro.mar"}, "page"=>"1", "app_key"=>"844d8c2d20a9cf9e97086df94f01e7bdd3d9afaa716055315706f2e31f40dc097c632af53e74ce3d5a1f23811b4e32e7a1e2b7fa5c128c8b28f1fc6e5a392015"} | |
| 2012-12-11T13:33:52+00:00 heroku[router]: at=info method=GET path=/v0/contacts?per%5Fpage=1000&where%5Blocal%5Fstatus%5Ffor%5Fmatosinhos%5D=student&where%5Bg |