BLADE - Alternate Name Routes

The BLADE module generates URLs that generally rely on ID values of the requested data to ensure that the correct data is returned. Using names instead of IDs can be ambiguous and are subject to naming constraints to be URL compatible. However in certain situations where this limitation of names is acceptable and manageable it can be useful for a person to be able to generate the BLADE URLs manually using names.

This has been enabled for:

Media

As of 14.9.5.1 you can access a media item by providing the

  • Content Group name

  • Bin name(s)

    • can be multiple, nested bins

  • Item name

  • File extension (optional)

    • providing the extension is more specific.

 

=> blade/media/ContentGroupName/BinName/ItemName

=> blade/media/ContentGroupName/BinName1/BinName2/ItemName.extension

Example 1

In this example the content group name is Global and the bin name is USElections and the item name is Donald Trump.

blade/media/Global/USElections/Donald Trump blade/media/Global/USElections/Donald Trump.jpg blade/media/Global/USElections/Donald%20Trump.jpg

would be the same as using the ID value format:

blade/media/450657 blade/media/450657.jpg

Note that in the ID value format above the extension is optional.

Example 2

If you had a nested bin (a bin within a bin) then you might have an example like this with bins named leagues and mlb.

blade/media/Global/leagues/mlb/tor blade/media/Global/leagues/mlb/tor.png

URL based Images - Use redirect parameter

You will want to add the query parameter redirect=true if your media items are URLs and you want the result to redirect to the URL.

Scores

As of 14.9.3.5 you can access a league’s scores by providing the

  • Content Group name

  • League code

=> blade/score/league/ContentGroupName/LeagueCode/?format=json&pretty=false

As of 15.6.3.3 you can filter the scores to a specific home team using

  • Team code

=> blade/score/league/ContentGroupName/LeagueCode/?homeTeam=TeamCode&…

Example 1

In this example the content group name is Global and the league code is MLB:

would be the same as using the ID value format:

Note that in the ID value format above - the MLB is informative only. It could be any of the following and it would still return the Global MLB scores:

Example 2

In this example the content group name is FanScores and the league code is MLB and the team is TOR:

Teams

As of 14.9.3.5 you can access a league’s teams by providing the

  • Content Group name

  • League code

=> blade/league/ContentGroupName/LeagueCode/?format=json&pretty=false

As of 15.6.3.3 you can filter the teams to a specific team using

  • Team code

=> blade/league/ContentGroupName/LeagueCode/?team=TeamCode&…

Example 1

In this example the content group name is Global and the league code is MLB:

Example 2

In this example the content group name is FanScores and the league code is MLB and the team is TOR:

Â