Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@astrochun
Copy link
Contributor

@astrochun astrochun commented Nov 18, 2020

Closes #1

As of 07/27/2021:
This feature was working last year around mid-Nov 2020. However, it stopped working. I found one of the reasons why and fixed it today in d281996. However, it still dies when retrieving stats data. This might be caused either by a bad base token (haven't check this in some time) or an issue with the stats API.

It sort of works to some degree as I ran it with one item and got the attached image.
timeline_12642506.pdf

Here's an example of a testing code that produced the above:

from figstats import stats, visualization

api_token = '***' # FIGSHARE PROD API TOKEN for administrator (see stache)
basic_token = '***' BASIC AUTHENTICATION using base64.encode (see stache)

fs2 = stats.Figshare(api_token=api_token, basic_token=basic_token, institution=True, institute='arizona')

article_id = '12642506'  # '12735992'
article_dict = fs2.retrieve_article_details(article_id)
timeline_dict = fs2.get_timeline(article_id, item='article', institution=True)

visualization.plot_timeline(timeline_dict, article_dict, save=True)

 - Include issue_request
 - setup.py config and requirements for installation
@astrochun astrochun self-assigned this Nov 18, 2020
Copy link
Contributor Author

@astrochun astrochun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Had to fix a bug when HTTPError occurred. This seems to happen with private items that may have a private link. Not entirely sure why this is happening since it should not.

 - Provide example for institution name
@astrochun astrochun changed the title feature/api [WIP] Main script and module to generate stats plots Jul 27, 2021
@astrochun astrochun added the enhancement New feature or request label Jul 27, 2021
@astrochun astrochun added this to the v0.1.0 milestone Jul 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants