vestorly_api 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://vestorly-dev.herokuapp.com/api/v1/advisors/rodas/advisor_user_entries.json?vestorly-auth=invalid
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 403
13
+ message: Forbidden
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - close
19
+ Date:
20
+ - Thu, 18 Sep 2014 23:44:05 GMT
21
+ Status:
22
+ - 403 Forbidden
23
+ Access-Control-Expose-Headers:
24
+ - api_version
25
+ Api-Version:
26
+ - 1.0.0
27
+ Content-Type:
28
+ - text/html; charset=utf-8
29
+ X-Ua-Compatible:
30
+ - IE=Edge,chrome=1
31
+ Cache-Control:
32
+ - no-cache
33
+ X-Request-Id:
34
+ - 10e6e7cb-7dd6-4413-a9f0-6efac6e4a94b
35
+ X-Runtime:
36
+ - '0.003777'
37
+ X-Rack-Cache:
38
+ - miss
39
+ Vary:
40
+ - Accept-Encoding
41
+ Via:
42
+ - 1.1 vegur
43
+ body:
44
+ encoding: UTF-8
45
+ string: " "
46
+ http_version:
47
+ recorded_at: Thu, 18 Sep 2014 23:44:05 GMT
48
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://vestorly-dev.herokuapp.com/api/v1/session_management/sign_in?password=nonexistingdude&username=invalid@example.com&version=1
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 401
13
+ message: Unauthorized
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - close
19
+ Date:
20
+ - Thu, 18 Sep 2014 23:44:06 GMT
21
+ Status:
22
+ - 401 Unauthorized
23
+ Access-Control-Expose-Headers:
24
+ - api_version
25
+ Api-Version:
26
+ - 1.0.0
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Access-Control-Max-Age:
30
+ - '1728000'
31
+ Access-Control-Allow-Methods:
32
+ - POST, GET, OPTIONS, PUT, DELETE
33
+ Access-Control-Allow-Headers:
34
+ - x-vestorly-auth, Origin, X-Requested-With, Content-Type, Accept, Authorization
35
+ Content-Type:
36
+ - application/json; charset=utf-8
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Cache-Control:
40
+ - no-cache
41
+ Set-Cookie:
42
+ - _vestorly_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTA3MWZjZWI4OTZmZjk4YWZlNjYzMTAzMjViNDY3ZDJlBjsAVA%3D%3D--a838a6994bd14868e6c7410472fa46fa69b443fa;
43
+ path=/; HttpOnly
44
+ X-Request-Id:
45
+ - 720490cb-0704-402c-9743-45d115682050
46
+ X-Runtime:
47
+ - '0.017566'
48
+ X-Rack-Cache:
49
+ - invalidate, pass
50
+ Vary:
51
+ - Accept-Encoding
52
+ Via:
53
+ - 1.1 vegur
54
+ body:
55
+ encoding: UTF-8
56
+ string: '{"message":"Invalid login credentials."}'
57
+ http_version:
58
+ recorded_at: Thu, 18 Sep 2014 23:44:06 GMT
59
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://vestorly-dev.herokuapp.com/api/v1/session_management/sign_out?version=1&vestorly-auth=invalidTokenSomething
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 404
13
+ message: Not Found
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - close
19
+ Date:
20
+ - Thu, 18 Sep 2014 23:44:05 GMT
21
+ Status:
22
+ - 404 Not Found
23
+ Access-Control-Expose-Headers:
24
+ - api_version
25
+ Api-Version:
26
+ - 1.0.0
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Access-Control-Max-Age:
30
+ - '1728000'
31
+ Access-Control-Allow-Methods:
32
+ - POST, GET, OPTIONS, PUT, DELETE
33
+ Access-Control-Allow-Headers:
34
+ - x-vestorly-auth, Origin, X-Requested-With, Content-Type, Accept, Authorization
35
+ Content-Type:
36
+ - application/json; charset=utf-8
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Cache-Control:
40
+ - no-cache
41
+ Set-Cookie:
42
+ - _vestorly_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTViZjM2Mjk2OGUxNWEzYWNhMzM5YWYzNTY2MzdhNDVlBjsAVA%3D%3D--820f923d90c59cbe1fb2c2934470d11d6d5ad4a6;
43
+ path=/; HttpOnly
44
+ X-Request-Id:
45
+ - 6deae66a-e132-4cdd-9592-1a432223a3f6
46
+ X-Runtime:
47
+ - '0.004199'
48
+ X-Rack-Cache:
49
+ - invalidate, pass
50
+ Vary:
51
+ - Accept-Encoding
52
+ Via:
53
+ - 1.1 vegur
54
+ body:
55
+ encoding: UTF-8
56
+ string: '{"message":"Not signed in."}'
57
+ http_version:
58
+ recorded_at: Thu, 18 Sep 2014 23:44:05 GMT
59
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,109 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://vestorly-dev.herokuapp.com/api/v1/session_management/sign_in?password=12desbrosses&username=david@vestorly.com&version=1
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 201
13
+ message: Created
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - close
19
+ Date:
20
+ - Thu, 18 Sep 2014 23:44:06 GMT
21
+ Status:
22
+ - 201 Created
23
+ Access-Control-Expose-Headers:
24
+ - api_version
25
+ Api-Version:
26
+ - 1.0.0
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Access-Control-Max-Age:
30
+ - '1728000'
31
+ Access-Control-Allow-Methods:
32
+ - POST, GET, OPTIONS, PUT, DELETE
33
+ Access-Control-Allow-Headers:
34
+ - x-vestorly-auth, Origin, X-Requested-With, Content-Type, Accept, Authorization
35
+ Content-Type:
36
+ - application/json; charset=utf-8
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - '"f22635638b2fe1ada79e94f9629214bb"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ Set-Cookie:
44
+ - _vestorly_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTY5NDA1OGZhMTc3NGM0MGZhZTdiNzc4NGUxODkwMjc0BjsAVA%3D%3D--6c8f7970bdf34342e2595f20fef886cca28fed3c;
45
+ path=/; HttpOnly
46
+ - vestorly-auth=eyJwYXlsb2FkIjoiNTM0ZDllYmZiMDM0ZDUwMDAyMDAwNGZkIiwiY3JlYXRlZF9vbiI6MTQxMTA4Mzg0Niwic2lnbmF0dXJlIjoiVUZtcmU5REZUb0V1KzNBY2dTajdGRTJlZVJ2REl0S0Nmbm1Mbzh5cWpIVT0ifQ;
47
+ path=/
48
+ X-Request-Id:
49
+ - 0d023497-3318-4669-a57d-ef92be967edf
50
+ X-Runtime:
51
+ - '0.146691'
52
+ X-Rack-Cache:
53
+ - invalidate, pass
54
+ Vary:
55
+ - Accept-Encoding
56
+ Via:
57
+ - 1.1 vegur
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"user":{"_id":"534d9ebfb034d500020004fd","_slugs":["rodas"],"about":"","account_type":"premium","activation_code":"ce4ouezeyy","activation_redirect_url":null,"active":true,"address":null,"adv_brochure":null,"advisor_employees":null,"assets":null,"assets_ary_update":"2014-09-16","auto_curation_enabled":false,"city":null,"company":"Rodas
61
+ Investments","compensation_method":null,"compliance_bcc_email_address":null,"consultation_reminder":"on","content_setup_completed":false,"content_setup_started":false,"created_at":null,"custodian":null,"disclosure":"534d9ebfb034d500020004fd/1403369701/DISCLOSE_TEST_DOC_with_long_name.pdf","email_blast":"off","email_blast_date":"2004-09-08T16:08:16+00:00","email_newsletter_date":null,"email_newsletter_hour":-1,"email_report_blast":"weekly","email_report_blast_date":"2014-09-15T11:03:25+00:00","embed_height":"800","embed_limit":"2","embed_width":"400","ember_login_only":true,"facebook_blast":"off","facebook_blast_date":"1994-04-15T21:03:59+00:00","facebook_newsletter_date":null,"facebook_newsletter_hour":-1,"facebook_uid":null,"first_name":"David","free_plan":false,"google_uid":null,"graph_start_date":"2014-04-18","has_friends":false,"have_advisor":false,"interest_consultation":"Not
62
+ Yet","interest_in_new_advisor":false,"invited":true,"invites":9,"is_authenticated":false,"is_seed_with_vestorly_news":false,"joined_on":"2014-04-15T21:03:59+00:00","last_check_prospect":"2004-04-15T20:39:49+00:00","last_name":"Rodas","last_newscred_update":"2014-07-22T17:37:46+00:00","last_update_all_arrays":"2014-09-16T20:33:40+00:00","last_weekly_email":"1994-04-15T21:03:59+00:00","launch_date":"2014-04-15T21:03:59+00:00","linkedin":null,"linkedin_blast":"off","linkedin_blast_date":"1994-04-15T21:03:59+00:00","linkedin_newsletter_date":null,"linkedin_newsletter_hour":-1,"linkedin_reminder_blast_date":"1994-04-15T21:03:59+00:00","linkedin_uid":null,"logo":null,"meeting_date":"Tue,
63
+ 15 Apr 2014 21:03:59 GMT","members_added":false,"members_added_started":false,"message_clicks":0,"message_sign_ups":0,"messages":0,"migrate_addl_social_model2":true,"migrate_addl_social_model3":false,"migrate_addl_social_model4":true,"migrated_advisor_users":true,"migrated_last_active_time":true,"migrated_model":true,"migrated_social_model":true,"migrated_social_model_advisor":true,"name":"David
64
+ Rodas","news_url":"https://test.vestorly.com","newscred_setting_id":"534f53b66aee1c0002000071","newsletter_setup_completed":false,"newsletter_setup_started":false,"num_advisor_clients":0,"num_advisor_prospects":35,"num_clients":null,"num_posts":32,"number_articles_per_group":2,"number_articles_per_newsletter":1,"other_compensation":null,"other_custodian":null,"other_services_types":null,"password_hash":"$2a$10$O01kjKb8wfGrsQHy.e0czuIhe2R3.Gmuu0HsIT39PeE1vkAntUqOG","past_due":false,"performance_audited":null,"phone":"3423331231","plan":"advisor-annual-subscription","portfolio_size":null,"posts_randomized":false,"profile_picture":null,"prospects_ary_update":"2014-09-16","redtail_api_user":{"_id":"539b099d243c3bc68b000005","access_token_expires_at":null,"api_key":null,"api_uri":null,"email":null,"last_friend_ordered_hash":"1994-06-13T14:24:29+00:00","name":null,"password":null,"refresh_token":null,"secret":null,"token":null,"total_friends":0,"uid":null,"user_key":null,"username":null},"referral_reminder":"on","reg_number":null,"require_pre_approval":false,"salesforce_account_id":null,"salesforce_api_user":{"_id":"539b099deacb48c4fc000009","access_token_expires_at":null,"add_to_group":true,"allow_update_all":false,"auto_export":false,"auto_import":false,"email":null,"export_context":"contact","export_only_new_items":true,"export_unknown":false,"group_object_name":"","import_context":"contact","instance_url":null,"last_friend_ordered_hash":"1994-06-13T14:24:29+00:00","last_import_date":null,"name":null,"password":"12desbrosses","refresh_token":null,"require_email":true,"secret":"1087942667670077342","token":"IBU3aTj28Lv5qXN9zilNXOInW","total_friends":0,"uid":"3MVG9xOCXq4ID1uEO0trcUt3Lg9LOtItqLkV.M7ZWj7kMbUg8.ET1KQffvzhaBr.RgiuaG4OZe1yfhfnXiZU","username":"david@vestorly.com","with_custom_fields":false},"salesforce_contact_id":null,"salesforce_lead_id":null,"services_types":null,"slug":"rodas","social_tabs_enabled":false,"state":null,"stripe_customer_id":null,"theme_id":"534f622be9cf36000200017f","top_bar_content_published":false,"top_bar_content_setup_completed":true,"top_bar_enabled":true,"top_bar_members_added":true,"top_bar_newsletter_setup_completed":false,"topics":["Investing","Sports","Business
65
+ News"],"trial_length":7776000,"twitter_blast":"off","twitter_blast_date":"1994-04-15T21:03:59+00:00","twitter_handle":null,"twitter_newsletter_date":null,"twitter_newsletter_hour":-1,"twitter_uid":null,"unsubscribed":false,"updated_at":"2014-09-16T20:33:40Z","user_type":"Advisor","username":"david@vestorly.com","views_ary_update":"2014-09-16","wall_post_clicks":0,"wall_post_sign_ups":0,"wall_posts":0,"webpage_image_id":"534da002a1abda0002000003","website":"http://asdasd.asdasd.com","weekly_email_blast":"on","yahoo_uid":null,"zip":null,"picture_url":null,"app_theme_logo_url":null},"new_user":false,"vestorly-auth":"eyJwYXlsb2FkIjoiNTM0ZDllYmZiMDM0ZDUwMDAyMDAwNGZkIiwiY3JlYXRlZF9vbiI6MTQxMTA4Mzg0Niwic2lnbmF0dXJlIjoiVUZtcmU5REZUb0V1KzNBY2dTajdGRTJlZVJ2REl0S0Nmbm1Mbzh5cWpIVT0ifQ","advisor_id":"rodas","advisor_company":"Rodas
66
+ Investments","advisor_picture_url":null,"advisor_website":"http://asdasd.asdasd.com","message":"Login
67
+ Successful.","theme":{"_id":"534f622be9cf36000200017f","activity_feed_enabled":true,"advisor_weekly_activity_btn_text":"View
68
+ your dashboard","advisor_weekly_activity_intro_text":"Here is your updated
69
+ report. You can view the activity in your community on your dashboard and
70
+ on the attached file.","allowTagging":false,"api_url":"https://test.vestorly.com","api_url_ssl":"https://test.vestorly.com","assets_vestorly_url":"//s3.amazonaws.com/assets-vestorly/","auto_publish_by_topics":true,"auto_publish_feature_enabled":true,"auto_publish_social_enabled":true,"auto_published_articles_number":2,"bodywrap":"#7a899f","bodywrap_text_color":"#FFFFFF","btn_bg_color":"#7a899f","btn_header_brand_bg":"$united-gray-light","btn_header_brand_border":"$united-gray-light","btn_header_item_bg":"$united-green","btn_header_item_border":"$united-green","btn_login_bg":"$united-blue","btn_newsletter_bg":"$united-blue","btn_suggest_bg":"lighten($united-blue,
71
+ 10%)","btn_suggest_border":"lighten($united-blue, 10%)","btn_text_color":"#FFFFFF","clean_featured_tile":false,"company_address":"12
72
+ Desbrosses Street, New York, New York 10013","company_contact_email":"hello@vestorly.com","company_homepage_url":"http://www.vestorly.com","company_name":"United
73
+ Capital","compliance_docs":"","compliance_docs_folder_url":"//s3.amazonaws.com/s3-dev.vestorly.com/","compliance_integration_enabled":true,"content_library_newsletter_enabled":false,"crm_integration_enabled":true,"csv_upload_enabled":false,"custom_navbar_enabled":true,"custom_sources_enabled":true,"default":false,"default_facebook_image":"","default_facebook_share_image_url":"http://s3.amazonaws.com/assets-united-cap/uc-default-share.png","default_loading_background":"//s3.amazonaws.com/s3.vestorly.com/webpage_images/5335e176b7fe8d0002000f14/image.?1396040061","default_slugname":"uc","default_social_providers_enabled":true,"drag_drop_enabled":false,"email_bannercolor":"#4b798e","email_bgcolor":"#4b798e","email_h3color":"#4b798e","email_header_image_url":"http://s3.amazonaws.com/assets-vestorly/emails/standard/email-header.png","email_header_path":"http://s3.amazonaws.com/assets-vestorly/emails/uc/united-source-email-header.png","email_headwrap":"#4b798e","email_more_button_image_url":"http://s3.amazonaws.com/assets-vestorly/emails/standard/more_btn.png","email_theme":"standard","email_theme_name":"standard","enable_premium_view":false,"enable_tagging":false,"extra_member_data_fields_enabled":false,"facebook_app_id":"undefined","facebook_preview":"","facebook_preview_image_url":"http://standard.vestorly.com/assets/vestorly/facebook-preview.png","favicon_image_url":"http://standard.vestorly.com/favicon.ico","featured_post_tile_footer_text":"","from_email":"thesource@unitedcp.com","full_data_pull_enabled":false,"gac_id":"UA-29479638-1","invite_approved_advisor_banner_img_url":"https://s3.amazonaws.com/assets-vestorly/emails/advisor+invite+mailer/banner.jpg","invite_approved_advisor_body_img_url":"https://s3.amazonaws.com/assets-vestorly/emails/advisor+invite+mailer/image.jpg","invite_approved_advisor_btn_img_url":"https://s3.amazonaws.com/assets-vestorly/emails/advisor+invite+mailer/button.jpg","invite_approved_advisor_foooter":"Vestorly
74
+ is still by invitation only. You''ve been selected because we value your feedback. Feel
75
+ free to e-mail us at","invite_approved_advisor_foooter_text":"Vestorly is
76
+ still by invitation only. You''ve been selected because we value your feedback. Feel
77
+ free to e-mail us at","invite_approved_advisor_footer_img_url":"https://s3.amazonaws.com/assets-vestorly/emails/advisor+invite+mailer/footer_bg.jpg","invite_approved_advisor_header":"You
78
+ are invited to join the next group of advisors using Vestorly to grow their
79
+ firms with smarter communication.","invite_approved_advisor_header_text":"You
80
+ are invited to join the next group of advisors using Vestorly to grow their
81
+ firms with smarter communication.","invite_approved_advisor_logo_img_url":"https://s3.amazonaws.com/assets-vestorly/emails/advisor+invite+mailer/logo.png","isMoneyMind":false,"is_default":true,"is_disable_https_login":false,"is_money_mind_enabled":false,"is_premium":false,"kit_id":"xxe6nui","linkedin_app_id":"x281lefk97mj","linkedin_preview":"","linkedin_preview_image_url":"http://standard.vestorly.com/assets/vestorly/linkedin-preview.png","login_btn_bg_color":"#7a899f","login_btn_border_color":"#7a899f","mailer_bottom_address":"500
82
+ Newport Center Drive, Newport Beach, CA","mailer_bottom_copyright":"United
83
+ Capital, 2014. All rights reserved.","mailer_footer_email":"hello@vestorly.com","mailer_from_email":"hello@vestorly.com","main_email":"thesource@unitedcp.com","main_logo":"http://s3.amazonaws.com/assets-vestorly/emails/uc/main-logo-dark.png","main_logo_dark":"","manual_publish_enabled":true,"member_activity_enabled":true,"member_data_enabled":true,"member_deleting_enabled":true,"member_export_enabled":false,"more_button_path":"http://s3.amazonaws.com/assets-vestorly/emails/uc/more_btn.jpg","multi_content_libraries_enabled":true,"name":"united_capital","navbar_background_color":"#1b1d26","navbar_default_bg":"$gray-dark","navbar_default_border":"$gray-dark","navbar_default_link_active_bg":"lighten($navbar-default-bg,
84
+ 5%)","navbar_discover_btn_bg_color":"#7a899f","navbar_discover_btn_border_color":"#7a899f","navbar_discover_btn_text":"Discover
85
+ More","navbar_extra_btn_bg_color":"#7a899f","navbar_extra_btn_border_color":"#7a899f","navbar_extra_btn_enabled":false,"navbar_extra_btn_text":"","navbar_extra_btn_url":"#","navbar_image_url":"http://s3.amazonaws.com/assets-vestorly/emails/standard/main-logo-dark.png","navbar_share_btn_bg_color":"#7a899f","navbar_share_btn_border_color":"#7a899f","navbar_share_btn_text":"Suggest
86
+ This","new_advisor_weekly_content":"Here is your updated report. You can
87
+ view the activity in your community on your dashboard and on the attached
88
+ file.","new_advisor_weekly_prompt":"View your dashboard","new_user_notification":true,"new_user_notification_btn_img_url":"https://s3.amazonaws.com/assets-vestorly/emails/advisor_new_prospect_mailer/go-to-dashboard.png","new_user_notification_email_override":null,"new_weekly_mailer_content":"Here
89
+ is a collection of %s''s latest activity, prepared for you.","new_weekly_mailer_default":"Hello","new_weekly_mailer_prompt":"See
90
+ what it''s about","new_weekly_mailer_saluation":"%s,","new_weekly_mailer_subject":"Our
91
+ latest update prepared for you","newsletter_btn_bg_color":"#7a899f","newsletter_btn_border_color":"#7a899f","newsletter_btn_text":"See
92
+ what it''s about","newsletter_default_salutation_text":"Hello,","newsletter_enabled":true,"newsletter_export_enabled":true,"newsletter_footer_image_url":"http://s3.amazonaws.com/assets-vestorly/emails/standard/main-logo-dark.png","newsletter_header_bg":"$united-gray","newsletter_intro_text":"Here
93
+ is a collection of %s''s latest activity, prepared for you.","newsletter_post_title_bg":"$united-blue","newsletter_post_title_bg_color":"#7a899f","newsletter_post_title_font":"Georgia,
94
+ Arial, serif","newsletter_saluation_text":"%s,","newsletter_schedule_enabled":true,"newsletter_stats_enabled":true,"newsletter_subject":"Our
95
+ latest update prepared for you","newsletter_tile_font":"Arial","on_error_blank_logo_image":"http://s3.amazonaws.com/assets-vestorly/default_images/blank-138x30.png","on_error_header_logo_image":"http://s3.amazonaws.com/assets-vestorly/default_images/blank-80x80.png","on_error_newsletter_footer_image":"http://s3.amazonaws.com/assets-vestorly/default_images/blank-newsletter-footer.png","on_error_newsletter_header_image":"http://s3.amazonaws.com/assets-vestorly/default_images/blank-email-header.png","on_error_profile_image":"http://s3.amazonaws.com/assets-vestorly/default_images/blank-80x80.png","on_error_recommend_post_image":"http://s3.amazonaws.com/assets-vestorly/default_images/blank-80x80.png","on_error_social_preview_image":"http://s3.amazonaws.com/assets-vestorly/default_images/blank-80x80.png","on_error_website_image":"http://s3.amazonaws.com/assets-vestorly/default_images/blank-80x80.png","open_reader_btn_enabled":false,"original_post_source_logo_url":null,"phone_number":"949-999-8500","play_tag_bg":"$united-green","play_tag_text":"$white","post_tagging_enabled":true,"privacy_policy":"https://www.vestorly.com/privacy","privacy_policy_url":"https://www.vestorly.com/privacy","publisher_home_url":"http://standard.vestorly.com","publisher_login_button":"Secure
96
+ Access","publisher_login_button_text":"Secure Access","publisher_login_explanation":"Enter
97
+ your credentials to get access","publisher_login_explanation_text":"Enter
98
+ your credentials to get access","publisher_login_header_text":"Welcome Back","publisher_login_ribbon":"Welcome
99
+ Back","reader_login_button":"See Your Collection","reader_login_button_text":"See
100
+ Your Collection","reader_login_explanation":"Enter your email for a personalized
101
+ experience","reader_login_explanation_text":"Enter your email for a personalized
102
+ experience","reader_login_header_text":"Your Personalized Library","reader_login_ribbon":"Your
103
+ Personalized Library","recommended_posts_enabled":false,"reporting_email_override":null,"sales_demo_url":"http://www.meetme.so/Vestorly","send_xls_weekly_report_enabled":false,"server_url":"//vestorly-dev.herokuapp.com","site_name":"http://test.vestorly.com","site_twitter":"","site_url":"http://test.vestorly.com","social_buttons_enabled":true,"social_description":"Community
104
+ Update","social_login_advisor_enabled":false,"social_login_reader_enabled":false,"social_posting_text":"%s
105
+ has an update, see what it''s about","social_publish_enabled":true,"social_title":"%s
106
+ Collection of Content","terms_and_conditions":"https://www.vestorly.com/terms","terms_and_conditions_url":"https://www.vestorly.com/terms","test_email_override":null,"topic_filtering_enabled":true,"twitter_preview":"","twitter_preview_image_url":"http://standard.vestorly.com/assets/vestorly/twitter-preview.png","uc_money_mind_enabled":true,"unclickable_featured_tile_enabled":true,"use_default_logo":"true","weekly_advisor_header_mobile_img_url":"https://s3.amazonaws.com/assets-vestorly/emails/advisor_weekly_advisor_report/header_mobile.jpg","work_tag_bg":"$united-blue","work_tag_text":"$white"}}'
107
+ http_version:
108
+ recorded_at: Thu, 18 Sep 2014 23:44:06 GMT
109
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://vestorly-dev.herokuapp.com/api/v1/session_management/sign_out?version=1&vestorly-auth=eyJwYXlsb2FkIjoiNGY2NTQyYzBjZmI0OTMwMDAxMDAwMDEzIiwiY3JlYXRlZF9vbiI6MTM5NjQ2MTg2MCwic2lnbmF0dXJlIjoiUzdYV1h6d2VaNk5vZWZialoxeGFrQmNlQjM0VktEb0s1bytRTGZOckZyST0ifQ
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 404
13
+ message: Not Found
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - close
19
+ Date:
20
+ - Thu, 18 Sep 2014 23:44:05 GMT
21
+ Status:
22
+ - 404 Not Found
23
+ Access-Control-Expose-Headers:
24
+ - api_version
25
+ Api-Version:
26
+ - 1.0.0
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Access-Control-Max-Age:
30
+ - '1728000'
31
+ Access-Control-Allow-Methods:
32
+ - POST, GET, OPTIONS, PUT, DELETE
33
+ Access-Control-Allow-Headers:
34
+ - x-vestorly-auth, Origin, X-Requested-With, Content-Type, Accept, Authorization
35
+ Content-Type:
36
+ - application/json; charset=utf-8
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Cache-Control:
40
+ - no-cache
41
+ Set-Cookie:
42
+ - _vestorly_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWM5MzdkZjE4N2FhNzExYmI5YzZkMTk2NzcyYTBkNmNiBjsAVA%3D%3D--6505d1125a8d79604b4881ead6c731dc30cb2735;
43
+ path=/; HttpOnly
44
+ X-Request-Id:
45
+ - 1253dc88-1d1d-438b-be44-0db11077e3f2
46
+ X-Runtime:
47
+ - '0.047299'
48
+ X-Rack-Cache:
49
+ - invalidate, pass
50
+ Vary:
51
+ - Accept-Encoding
52
+ Via:
53
+ - 1.1 vegur
54
+ body:
55
+ encoding: UTF-8
56
+ string: '{"message":"Not signed in."}'
57
+ http_version:
58
+ recorded_at: Thu, 18 Sep 2014 23:44:05 GMT
59
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,44 @@
1
+ require 'bundler/setup'
2
+ Bundler.setup
3
+
4
+ require 'vestorly_api'
5
+ require 'rspec'
6
+ require 'rspec/autorun'
7
+ require 'webmock'
8
+ require 'vcr'
9
+ require 'turn'
10
+
11
+
12
+ Turn.config do |config|
13
+ config.format = :outline
14
+ config.trace = true
15
+ config.natural = true
16
+ end
17
+
18
+ VCR.configure do |config|
19
+ config.cassette_library_dir = 'spec/fixtures/vestorly_api_cassettes'
20
+ config.hook_into :webmock
21
+ config.configure_rspec_metadata!
22
+ end
23
+
24
+ VestorlyApi.configure do |config|
25
+ config.api_uri = 'https://vestorly-dev.herokuapp.com'
26
+ end
27
+
28
+ # This file was generated by the `rspec --init` command. Conventionally, all
29
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
30
+ # Require this file using `require "spec_helper"` to ensure that it is only
31
+ # loaded once.
32
+ #
33
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
34
+ RSpec.configure do |config|
35
+ config.treat_symbols_as_metadata_keys_with_true_values = true
36
+ config.run_all_when_everything_filtered = true
37
+ config.filter_run :focus
38
+
39
+ # Run specs in random order to surface order dependencies. If you find an
40
+ # order dependency and want to debug it, you can fix the order by providing
41
+ # the seed, which is printed after each run.
42
+ # --seed 1234
43
+ config.order = 'random'
44
+ end
@@ -0,0 +1,112 @@
1
+ require 'spec_helper'
2
+
3
+ describe VestorlyApi::AdvisorBase do
4
+
5
+ def api_request_helper(requester, request_params)
6
+ requester.get(
7
+ requester.advisor_api_endpoint,
8
+ query: request_params
9
+ )
10
+ end
11
+
12
+ describe 'default attributes' do
13
+
14
+ subject { described_class }
15
+
16
+ it 'should include httparty methods' do
17
+ subject.should include(HTTParty)
18
+ end
19
+
20
+ it 'gives the base uri api for advisors' do
21
+ subject.advisor_api_endpoint.should eq('https://vestorly-dev.herokuapp.com/api/v1/advisors')
22
+ end
23
+
24
+ end
25
+
26
+ describe 'with valid parameters' do
27
+
28
+ let(:username) { 'david@vestorly.com' }
29
+ let(:password) { '12desbrosses' }
30
+ let(:advisor_id) { 'rodas' }
31
+
32
+ let(:request_params) { {
33
+ username: username,
34
+ password: password
35
+ }}
36
+
37
+ let(:authentication_token) { "eyJwYXlsb2FkIjoiNGY2NTQyYzBjZmI0OTMwMDAxMDAwMDEzIiwiY3JlYXRlZF9vbiI6MTM5NjQ2MTg2MCwic2lnbmF0dXJlIjoiUzdYV1h6d2VaNk5vZWZialoxeGFrQmNlQjM0VktEb0s1bytRTGZOckZyST0ifQ" }
38
+
39
+ before do
40
+ VestorlyApi::SignIn.any_instance.stub(:sign_in).with(username, password).and_return { authentication_token }
41
+ VestorlyApi::SignIn.any_instance.stub(:authentication_token).and_return { authentication_token }
42
+ VestorlyApi::SignIn.any_instance.stub(:advisor_id).and_return { advisor_id }
43
+ @sign_in_api = VestorlyApi::SignIn.new(username, password)
44
+ end
45
+
46
+ subject { described_class }
47
+
48
+ it 'gives the api endpoints based action' do
49
+ advisor_api = described_class.new(@sign_in_api)
50
+ advisor_api.action_api_endpoint('some_action.json')
51
+ .should eq("https://vestorly-dev.herokuapp.com/api/v1/advisors/rodas/some_action.json")
52
+ end
53
+
54
+ describe 'advisor user entries' do
55
+
56
+ before do
57
+ VCR.insert_cassette 'advisor_user_entries', :record => :new_episodes
58
+ end
59
+
60
+ after do
61
+ VCR.eject_cassette
62
+ end
63
+
64
+ it 'records the fixture' do
65
+ advisor_api = described_class.new(@sign_in_api)
66
+ advisor_api.members({ 'filter_by' => 'prospects' })
67
+ end
68
+
69
+ it 'gives the advisor user entries' do
70
+ advisor_api = described_class.new(@sign_in_api)
71
+ response = advisor_api.members({ 'filter_by' => 'prospects' })
72
+ response.code.should eq(200)
73
+ end
74
+
75
+ end
76
+
77
+ describe 'advisor csv upload' do
78
+ before do
79
+ VCR.insert_cassette 'advisor_csv_upload', :record => :new_episodes
80
+ end
81
+
82
+ after do
83
+ VCR.eject_cassette
84
+ end
85
+ end
86
+
87
+ describe 'advisor advisor_posts' do
88
+
89
+ before do
90
+ VCR.insert_cassette 'advisor_posts', :record => :new_episodes
91
+ end
92
+
93
+ after do
94
+ VCR.eject_cassette
95
+ end
96
+
97
+ it 'records the fixture' do
98
+ advisor_api = described_class.new(@sign_in_api)
99
+ advisor_api.advisor_posts
100
+ end
101
+
102
+ it 'gives the advisor user entries' do
103
+ advisor_api = described_class.new(@sign_in_api)
104
+ response = advisor_api.advisor_posts
105
+ response.code.should eq(200)
106
+ end
107
+
108
+ end
109
+
110
+ end
111
+
112
+ end