dblock / strava-ruby-client

A complete Ruby client for the Strava API v3.
https://code.dblock.org/2018/11/27/writing-a-new-strava-api-ruby-client.html
MIT License
97 stars 22 forks source link

Implements RateLimit for API Request/Response #50

Closed simonneutert closed 2 years ago

simonneutert commented 2 years ago

@dblock sorry for the delay, I am struggling a little at the time 😢

I really hope this attempt is way more appealing. If so, I will try to finish it asap.

This PR superseeds https://github.com/dblock/strava-ruby-client/pull/40

closes #11

dangerpr-bot commented 2 years ago
1 Error
:no_entry_sign: The TOC found in README.md doesn't match the sections of the file.
1 Warning
:warning: [DEPRECATION] check is deprecated. Please use check! instead.

Here's the expected TOC for README.md:

# Table of Contents

- [Installation](#installation)
- [Usage](#usage)
  - [Activities](#activities)
    - [Create an Activity](#create-an-activity)
    - [Get Activity](#get-activity)
    - [List Activity Photos](#list-activity-photos)
    - [List Activity Comments](#list-activity-comments)
    - [List Activity Kudoers](#list-activity-kudoers)
    - [List Activity Laps](#list-activity-laps)
    - [List Athlete Activities](#list-athlete-activities)
    - [Get Activity Zones](#get-activity-zones)
    - [Update Activity](#update-activity)
  - [Athletes](#athletes)
    - [Get Authenticated Athlete](#get-authenticated-athlete)
    - [Get Zones](#get-zones)
    - [Get Athlete Stats](#get-athlete-stats)
    - [Update Athlete](#update-athlete)
  - [Clubs](#clubs)
    - [List Club Activities](#list-club-activities)
    - [List Club Events](#list-club-events)
    - [List Club Administrators](#list-club-administrators)
    - [Get Club](#get-club)
    - [List Club Members](#list-club-members)
    - [List Athlete Clubs](#list-athlete-clubs)
  - [Gears](#gears)
    - [Get Equipment](#get-equipment)
  - [Routes](#routes)
    - [Export Route GPX](#export-route-gpx)
    - [Export Route TCX](#export-route-tcx)
    - [Get Route](#get-route)
    - [List Athlete Routes](#list-athlete-routes)
  - [Running Races](#running-races)
    - [Get Running Race](#get-running-race)
  - [Segment Efforts](#segment-efforts)
    - [List Segment Efforts](#list-segment-efforts)
    - [Get Segment Effort](#get-segment-effort)
  - [Segments](#segments)
    - [Explore Segments](#explore-segments)
    - [List Starred Segments](#list-starred-segments)
    - [Get Segment](#get-segment)
    - [Star Segment](#star-segment)
  - [Streams](#streams)
    - [Get Activity Streams](#get-activity-streams)
    - [Get Segment Effort Streams](#get-segment-effort-streams)
    - [Get Segment Streams](#get-segment-streams)
  - [Uploads](#uploads)
    - [Upload Activity](#upload-activity)
    - [Get Upload](#get-upload)
  - [Pagination](#pagination)
  - [OAuth](#oauth)
    - [OAuth Workflow](#oauth-workflow)
    - [Deauthorize](#deauthorize)
    - [Command Line OAuth Workflow](#command-line-oauth-workflow)
  - [Webhooks](#webhooks)
- [Ratelimit](#ratelimit)
- [Configuration](#configuration)
  - [Web Client Options](#web-client-options)
  - [API Client Options](#api-client-options)
  - [OAuth Client Options](#oauth-client-options)
  - [Webhooks Client Options](#webhooks-client-options)
- [Errors](#errors)
- [Tools](#tools)
  - [Strava OAuth Token](#strava-oauth-token)
- [Users](#users)
- [Resources](#resources)
- [Upgrading](#upgrading)
- [Contributing](#contributing)
- [Copyright and License](#copyright-and-license)

Generated by :no_entry_sign: Danger

simonneutert commented 2 years ago

@dblock I gave it another go 🤞 naming is definitely to be improved, but I wanted to have it working first.

simonneutert commented 2 years ago

tests run clear ✅
to be honest, I hope this is more what you want it to be.

of course, tests for the other models wold be added - if you say it's going the right direction.

dblock commented 2 years ago

Let's get https://github.com/dblock/strava-ruby-client/pull/52 first in!

dblock commented 2 years ago

Care to rebase this @simonneutert?

simonneutert commented 2 years ago

it must feel like kindergarten for you, but be assured I appreciate the time you take to teach me so very much! pulled master back in 👍

adamwolf commented 2 years ago

Hi folks! I'm wondering where this has landed. If this is something that I can help finish up, I'd love to try to help!

simonneutert commented 2 years ago

Hi @adamwolf what needs to be done was commented. I'd love to have someone work with me on that one 👍

adamwolf commented 2 years ago

I've addressed much of the PR feedback at https://github.com/adamwolf/strava-ruby-client/tree/rate-limit. I added commits after simonneutert's work.

I'm not 100% sure of my changes (and I haven't made any changes to README.md), but the commit messages should explain which things I'm not really sure of. Tests pass!

I'm pretty handy with git, so feel free to ask me to rebase or squash or do whatever. I do not intend to take any credit away from simonneutert or amyone--I'm just a person hitting rate limit with a Strava integration :)

simonneutert commented 2 years ago

If you finish it, I am glad to have helped paving the start. The credit is all yours then 🤝

So happy you jumped in to help 🥳

dblock commented 2 years ago

@adamwolf please open a PR!

simonneutert commented 2 years ago

I've took the freedom and pulled the PR of @adamwolf and rebased to current master 🤞

As far as I can tell there is no model, that doesn't inherit from the new Strava::Web::Reponse class.

I couldn't figure out what you mean here @dblock so please give me a clue.

adamwolf commented 2 years ago

Thanks! I had some other things come up at work and they ended up bringing us under the rate limit, so this got preempted a bit... :)