Skip to content
This repository has been archived by the owner on Feb 12, 2025. It is now read-only.

Fix issue with reputation attribute on User getting set to the API request reputation method #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dasnixon
Copy link

@thomas-mcdonald not sure if you want to accept this, but just making the issue known.

#<Serel::User:70106256894280 @user_id=1749024, @user_type=registered, @creation_date=2012-10-15 22:29:34 -0700, @display_name=liamneesonsarmsauce, @profile_image=https://www.gravatar.com/avatar/87dcde02e2f35930e9a6a3e239f2ec81?d=identicon&r=PG, @reputation=#<Serel::Relation:0x007f85c5147650>, @reputation_change_day=50, @reputation_change_week=50, @reputation_change_month=190, @reputation_change_quarter=190, @reputation_change_year=245, @age=24, @last_access_date=2013-07-15 18:26:47 -0700, @last_modified_date=2013-07-15 16:35:05 -0700, @is_employee=false, @link=http://stackoverflow.com/users/1749024/liamneesonsarmsauce, @website_url=http://liamneesonsarm.com, @location=San Francisco, CA, @account_id=1943367, @badge_counts={"gold"=>0, "silver"=>0, "bronze"=>9} >

You can see the issue in the object above. The reputation attribute is the #<Serel::Relation:0x007f85c5147650> and not the integer value.

Fix issue with reputation attribute on User getting set to the API request reputation method
@dasnixon
Copy link
Author

dasnixon commented Aug 3, 2013

@thomas-mcdonald is it possible to get this merged, I'm also going to try to implement a refresh! method to refresh an expired token, I've ran into issues with my token expiring.

@dasnixon
Copy link
Author

dasnixon commented Aug 3, 2013

Well I figured out you can actually get non-expiring tokens by adding 'no_expiry' into scope

provider :stackexchange, ENV['STACKEXCHANGE_CLIENT_ID'], ENV['STACKEXCHANGE_CLIENT_SECRET'], public_key: ENV['STACKEXCHANGE_PUB_KEY'], site: 'stackoverflow', scope: 'no_expiry'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant