72bf365285
persist and list with database create episodeAction list reponse (with mocked timestamp, started and total) create episodeActions with received values update existing episodeActions by unique episode link receive and store subscription changes deal with multiple subscription changes in single request split database into subdirectories only return subscription changes younger then passed parameter since parse passed timestamp parse passed timestamp for episode_actions listing only return list of urls for subscription changes align list endpoint naming schema store userId with episode actions and subscriptions return json object on application root route
84 lines
1.3 KiB
PHP
84 lines
1.3 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\GPodderSync\Core\EpisodeAction;
|
|
|
|
class EpisodeAction {
|
|
private string $podcast;
|
|
private string $episode;
|
|
private string $action;
|
|
private string $timestamp;
|
|
private int $started;
|
|
private int $position;
|
|
private int $total;
|
|
|
|
public function __construct(
|
|
string $podcast,
|
|
string $episode,
|
|
string $action,
|
|
string $timestamp,
|
|
int $started,
|
|
int $position,
|
|
int $total
|
|
) {
|
|
$this->podcast = $podcast;
|
|
$this->episode = $episode;
|
|
$this->action = $action;
|
|
$this->timestamp = $timestamp;
|
|
$this->started = $started;
|
|
$this->position = $position;
|
|
$this->total = $total;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getPodcast(): string {
|
|
return $this->podcast;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getEpisode(): string {
|
|
return $this->episode;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getAction(): string {
|
|
return $this->action;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getTimestamp(): string {
|
|
return $this->timestamp;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getStarted(): int {
|
|
return $this->started;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getPosition(): int {
|
|
return $this->position;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getTotal(): int {
|
|
return $this->total;
|
|
}
|
|
|
|
|
|
}
|