Skip to content

Commit

Permalink
Updates in line with swagger file of 13 jan 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
canihavesomecoffee committed Jan 24, 2022
1 parent 8b60414 commit 6269609
Show file tree
Hide file tree
Showing 26 changed files with 454 additions and 55 deletions.
70 changes: 70 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,76 @@

## 2.x

### 2.1.0 (24 January 2022)

API additions

* Routes
* SeriesRoute
* allows passing episode id when searching
* allows passing airdate when searching
* Models
* EntityUpdate
* New field: seriesId (for episode updates)
* CompanyType
* Changed field: id -> companyTypeId
* Changed field: name -> companyTypeName
* Links
* New field: total_items
* New field: page_size
* Series
* Base (and extended)
* New field: episodes
* Extended
* New field: originalNetwork
* New field: latestNetwork
* New field: translations
* New field: tags
* Episodes
* Base (and extended)
* New field: seasonName
* New field: finaleType
* Extended
* New field: companies
* airsAfterSeason, airsBeforeSeason and airsBeforeEpisode have moved from the extended to the base record
* Artwork
* Extended
* New field: tagOptions
* Company
* New field: companies
* New field: parentCompany
* SeasonType
* New field: alternateName
* New model: ParentCompany
* New mode: CompanyRelationShip
* Character
* New field: personImgURL
* ListExtendedRecord
* New field: image
* New field: imageIsFallback
* ContentRating
* New field: description
* EntityType
* Removed field: seriesId
* New field: hasSpecials
* ListBaseRecord
* New field: score
* MovieBaseRecord (and extended)
* New field: runtime
* New field: lastUpdated
* PeopleBaseRecord
* New field: nameTranslations
* New field: overviewTranslations
* PeopleExtendedRecord
* New field: slug
* SeasonBaseRecord (remain in Extended Record)
* Removed field: abbreviation
* Removed field: country
* Removed field: slug
* New field: companies
* Inspiration
* Renamed field: typeName -> type_name

### 2.0.14 (29 October 2021)

Bugfix release
Expand Down
6 changes: 6 additions & 0 deletions src/Model/ArtworkExtendedRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,10 @@ class ArtworkExtendedRecord extends ArtworkBaseRecord
* @var integer
*/
public int $width;
/**
* Tag options.
*
* @var TagOption[]|null
*/
public ?array $tagOptions;
}
6 changes: 6 additions & 0 deletions src/Model/Character.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ class Character
* @var string
*/
public string $personName;
/**
* The url of this character?
*
* @var string
*/
public string $personImgURL;


}
14 changes: 13 additions & 1 deletion src/Model/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Company
*/
public ?string $country;
/**
* Identifier for this character.
* Identifier for this company.
*
* @var integer
*/
Expand Down Expand Up @@ -96,4 +96,16 @@ class Company
* @var string
*/
public string $slug;
/**
* Companies linked.
*
* @var Companies|null
*/
public ?Companies $companies;
/**
* Parent company.
*
* @var ParentCompany|null
*/
public ?ParentCompany $parentCompany;
}
51 changes: 51 additions & 0 deletions src/Model/CompanyRelationShip.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/**
* Copyright (c) 2021, Willem Van Iseghem (canihavesomecoffee) <theTVDbAPI@canihavesome.coffee>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby
* granted, provided that the above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* Provides a class for a relationship between companies.
*
* PHP version 7.4
*
* @category TheTVDbAPI
* @package CanIHaveSomeCoffee\TheTVDbAPI\Model
* @author Willem Van Iseghem (canihavesomecoffee) <theTVDbAPI@canihavesome.coffee>
* @license See start of document
* @link https://canihavesome.coffee/projects/theTVDbAPI
*/
declare(strict_types = 1);

namespace CanIHaveSomeCoffee\TheTVDbAPI\Model;

/**
* Class CompanyRelationShip
*
* @category TheTVDbAPI
* @package CanIHaveSomeCoffee\TheTVDbAPI\Model
* @author Willem Van Iseghem (canihavesomecoffee) <theTVDbAPI@canihavesome.coffee>
* @license See start of document
* @link https://canihavesome.coffee/projects/theTVDbAPI
*/
class CompanyRelationShip
{
/**
* Identifier for this relationship.
*
* @var integer
*/
public int $id;
/**
* Name of the relationship.
*
* @var string
*/
public string $typeName;
}
4 changes: 2 additions & 2 deletions src/Model/CompanyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class CompanyType
*
* @var integer
*/
public int $id;
public int $companyTypeId;
/**
* Name of the company (original).
*
* @var string
*/
public string $name;
public string $companyTypeName;
}
6 changes: 6 additions & 0 deletions src/Model/ContentRating.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,10 @@ class ContentRating
* @var string
*/
public string $fullName;
/**
* Description for the content rating.
*
* @var string
*/
public string $description;
}
6 changes: 3 additions & 3 deletions src/Model/EntityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class EntityType
*/
public string $name;
/**
* Series ID for this entity.
* Has this entity specials?
*
* @var integer
* @var boolean
*/
public int $seriesId;
public bool $hasSpecials;
}
6 changes: 6 additions & 0 deletions src/Model/EntityUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ class EntityUpdate
* @var integer
*/
public int $timeStamp;
/**
* Only present for episodes records.
*
* @var integer
*/
public int $seriesId;
}
30 changes: 30 additions & 0 deletions src/Model/EpisodeBaseRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,34 @@ class EpisodeBaseRecord
* @var string|null
*/
public ?string $overview;
/**
* Season name if known.
*
* @var string|null
*/
public ?string $seasonName;
/**
* Type of finale (season, midseason or series).
*
* @var string|null
*/
public ?string $finaleType;
/**
* Indicates if the special aired after said season.
*
* @var integer|float|null
*/
public $airsAfterSeason;
/**
* Indicates if the special aired before said season.
*
* @var integer|float|null
*/
public $airsBeforeSeason;
/**
* Indicates if a special aired before a certain episode.
*
* @var integer|float|null
*/
public $airsBeforeEpisode;
}
24 changes: 6 additions & 18 deletions src/Model/EpisodeExtendedRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,6 @@
*/
class EpisodeExtendedRecord extends EpisodeBaseRecord
{
/**
* Indicates if the special aired after said season.
*
* @var integer|float|null
*/
public $airsAfterSeason;
/**
* Indicates if the special aired before said season.
*
* @var integer|float|null
*/
public $airsBeforeSeason;
/**
* Indicates if a special aired before a certain episode.
*
* @var integer|float|null
*/
public $airsBeforeEpisode;
/**
* List of awards this episode got.
*
Expand Down Expand Up @@ -97,4 +79,10 @@ class EpisodeExtendedRecord extends EpisodeBaseRecord
* @var InspirationType[] Entries are of type Trailer.
*/
public array $trailers;
/**
* List of companies for this series.
*
* @var Company[]
*/
public array $companies;
}
2 changes: 1 addition & 1 deletion src/Model/Inspiration.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Inspiration
*
* @var string
*/
public string $typeName;
public string $type_name;
/**
* URL of the inspiration.
*
Expand Down
12 changes: 12 additions & 0 deletions src/Model/Links.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,16 @@ class Links
* @var string|null
*/
public ?string $next;
/**
* Total items that can be retrieved.
*
* @var integer
*/
public int $total_items;
/**
* Items per page.
*
* @var integer
*/
public int $page_size;
}
6 changes: 6 additions & 0 deletions src/Model/ListBaseRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,10 @@ class ListBaseRecord
* @var string
*/
public string $url;
/**
* The id of the parent studio (if available).
*
* @var integer|null|float
*/
public $score;
}
12 changes: 12 additions & 0 deletions src/Model/ListExtendedRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,16 @@ class ListExtendedRecord extends ListBaseRecord
* @var integer
*/
public int $score;
/**
* URL to an image.
*
* @var string|null
*/
public ?string $image;
/**
* Is image fallback?
*
* @var boolean
*/
public bool $imageIsFallback;
}
14 changes: 14 additions & 0 deletions src/Model/MovieBaseRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

namespace CanIHaveSomeCoffee\TheTVDbAPI\Model;

use DateTime;

/**
* Class MovieBaseRecord
*
Expand Down Expand Up @@ -87,4 +89,16 @@ class MovieBaseRecord
* @var Status
*/
public Status $status;
/**
* The last updated timestamp.
*
* @var DateTime|null
*/
public ?DateTime $lastUpdated;
/**
* Runtime of this episode in minutes
*
* @var float|integer|null
*/
public $runtime;
}
Loading

0 comments on commit 6269609

Please sign in to comment.