Skip to content

Commit

Permalink
refactor (LeaguePositions): Remove endpoints, add v0.9.10 breaking ch…
Browse files Browse the repository at this point in the history
…angelog entry
  • Loading branch information
cnguy committed Jun 13, 2019
1 parent 8b528cd commit 414fa11
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 235 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,14 @@
# 0.9.10 (BREAKING)

Removals:

* Deprecate position ranking-related endpoints as per Riot's [instructions](https://www.riotgames.com/en/DevRel/riot-api-update-190417). Stay on v0.9.9 if you need time

Feats:

* Upgrade package.json requirements for `dotenv`, `supports-color`, and `lru-cache`


# 0.9.9

Feats:
Expand Down
12 changes: 6 additions & 6 deletions ENDPOINTS.md
Expand Up @@ -19,15 +19,15 @@ League.Entries.list(queue: string, tier: string, division: string)
Grandmaster.list(queueName: string)
League.by.uuid(leagueUUID: string)
Master.list(queueName: string)
League.PositionalRankQueue.list()
LeaguePositions.by.summonerID(summonerID: string)
League.PositionalRankQueue.list() // deprecated June 17th and in `v0.9.10`
LeaguePositions.by.summonerID(summonerID: string) // deprecated June 17th and in `v0.9.10`
LeaguePositions.list(
positionalQueue: queueName | string,
tier: tierName | string,
division: divisionName | string,
position: positionName | string,
page: int,
)
) // deprecated June 17th and in 'v0.9.10`

/* DDRAGON
At its core, DDragonRequest uses `version()` and `locale()`.
Expand Down Expand Up @@ -115,9 +115,9 @@ Everything should be in the same order as in the official docs.
- [x] `Get the grandmaster league of a specific queue.`
- [x] `Get league with given ID, including inactive entries.`
- [x] `Get the master league for given queue.`
- [x] `Get the queues that have positional ranks enabled.`
- [x] `Get league positions in all queues for a given summoner ID.`
- [x] `Get all the positional league entries.`
- [x] `Get the queues that have positional ranks enabled.` (deprecated June 17th and in `v0.9.10`)
- [x] `Get league positions in all queues for a given summoner ID.` (deprecated June 17th and in `v0.9.10`)
- [x] `Get all the positional league entries.` (deprecated June 17th and in `v0.9.10`)
## LOL-STATUS-V3
- [x] `Get League of Legends status for the given shard.`
Expand Down
23 changes: 0 additions & 23 deletions lib/Endpoints/LeagueEndpoint/LeagueEndpointV4.js
Expand Up @@ -12,10 +12,6 @@ class LeagueEndpointV4 extends LeagueSuperclass {
uuid: this.uuid.bind(this),
}

this.PositionalRankQueue = {
list: this.listPositionalRankQueues.bind(this),
}

this.limiter = limiter
}

Expand All @@ -39,25 +35,6 @@ class LeagueEndpointV4 extends LeagueSuperclass {
4,
)
}

/**
* Get the queues that have positional ranks enabled.
*
* Implements GET `/lol/league/v4/positional-rank-queues`.
*/
listPositionalRankQueues() {
return new Request(
this.config,
this.serviceName,
'positional-rank-queues',
METHOD_NAMES.LEAGUE.GET_ALL_POSITIONAL_RANK_QUEUES_V4,
'GET',
this.limiter,
null,
false,
4,
)
}
}

export default LeagueEndpointV4
61 changes: 0 additions & 61 deletions lib/Endpoints/LeagueEndpoint/LeaguePositionsEndpointV4.js

This file was deleted.

6 changes: 0 additions & 6 deletions lib/Kayn.js
Expand Up @@ -29,7 +29,6 @@ import FeaturedGamesEndpointV4 from './Endpoints/SpectatorEndpoint/FeaturedGames
import GrandmasterEndpointV4 from './Endpoints/LeagueEndpoint/GrandmasterEndpointV4'
import LeagueEndpointV4 from './Endpoints/LeagueEndpoint/LeagueEndpointV4'
import LeagueEntriesEndpointV4 from './Endpoints/LeagueEndpoint/LeagueEntriesEndpointV4'
import LeaguePositionsEndpointV4 from './Endpoints/LeagueEndpoint/LeaguePositionsEndpointV4'
import MasterEndpointV4 from './Endpoints/LeagueEndpoint/MasterEndpointV4'
import MatchEndpointV4 from './Endpoints/MatchEndpoint/MatchEndpointV4'
import MatchlistEndpointV4 from './Endpoints/MatchEndpoint/MatchlistEndpointV4'
Expand Down Expand Up @@ -157,11 +156,6 @@ class Kayn {
this.config,
this.limiter,
)
this.LeaguePositionsV4 = new LeaguePositionsEndpointV4(
this.config,
this.limiter,
)
this.LeaguePositions = this.LeaguePositionsV4
this.MasterV4 = new MasterEndpointV4(this.config, this.limiter)
this.Master = this.MasterV4
this.MatchV4 = new MatchEndpointV4(this.config, this.limiter)
Expand Down
26 changes: 0 additions & 26 deletions test/unit/endpoints/LeagueEndpoint/LeagueEndpointV4.spec.js
Expand Up @@ -28,30 +28,4 @@ describe('LeagueEndpointV4', function() {
})
})
})

describe('.PositionalRankQueue.list', function() {
it('should have the correct payload #1', function() {
const { payload } = this.League.PositionalRankQueue.list().region(
'na',
)
expect(payload).to.deep.equal({
method: 'GET',
serviceName: 'league',
endpoint: 'positional-rank-queues',
query: [],
region: 'na',
isTournament: false,
version: 4,
})
})

it('should have the correct method name', function() {
const {
methodName,
} = this.League.PositionalRankQueue.list().region('na')
expect(methodName).to.equal(
'LEAGUE.GET_ALL_POSITIONAL_RANK_QUEUES_V4',
)
})
})
})
101 changes: 0 additions & 101 deletions test/unit/endpoints/LeagueEndpoint/LeaguePositionsEndpointV4.spec.js

This file was deleted.

12 changes: 0 additions & 12 deletions typings/index.d.ts
Expand Up @@ -87,10 +87,6 @@ declare module 'kayn' {
) => KaynRequest<dtos.LeagueV4LeagueListDTO>
}

PositionalRankQueue: {
list: () => KaynRequest<string[]>
}

Entries: {
bySummonerID: (
encryptedSummonerID: string,
Expand All @@ -115,14 +111,6 @@ declare module 'kayn' {
) => KaynRequest<dtos.LeagueV4LeagueListDTO>
}

public LeaguePositions: {
by: {
summonerID: (
summonerID: string,
) => KaynRequest<dtos.LeagueV4LeaguePositionDTO[]>
}
}

public Match: {
get: (matchID: number) => KaynRequest<dtos.MatchV4MatchDto>
timeline: (
Expand Down

0 comments on commit 414fa11

Please sign in to comment.