Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. {
  2. "result_count": 8132,
  3. "page_size": 250,
  4. "current_page": 1,
  5. "total_pages": 33,
  6. "api_call_credits": 1,
  7. "data": [
  8. {
  9. "ticker": "A",
  10. "name": "Agilent Technologies Inc",
  11. "lei": "QUIX8Y7A2WP0XRMW7G29",
  12. "cik": "0001090872",
  13. "latest_filing_date": "2017-02-06"
  14. }
  15.  
  16. class Finance < ApplicationRecord
  17. include HTTParty
  18.  
  19. def self.response
  20. auth = {
  21. username: "username",
  22. password: "password"
  23. }
  24. options = { basic_auth: auth }
  25. data_url = "https://api.intrinio.com/companies?ticker=AAPL"
  26. HTTParty.get(data_url, options)
  27. end
  28. end
  29.  
  30. class FinancesController < ApplicationController
  31. def index
  32. @response = Finance.response
  33. end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement