Skip to content

Commit 1d2b7a7

Browse files
committed
add missing types to OG
1 parent 168b973 commit 1d2b7a7

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

src/OpenGraph.php

+48
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44

55
use Astrotomic\OpenGraph\Types\Article;
66
use Astrotomic\OpenGraph\Types\Book;
7+
use Astrotomic\OpenGraph\Types\Music\Album;
8+
use Astrotomic\OpenGraph\Types\Music\Playlist;
9+
use Astrotomic\OpenGraph\Types\Music\RadioStation;
10+
use Astrotomic\OpenGraph\Types\Music\Song;
711
use Astrotomic\OpenGraph\Types\Profile;
12+
use Astrotomic\OpenGraph\Types\Video\Episode;
13+
use Astrotomic\OpenGraph\Types\Video\Movie;
14+
use Astrotomic\OpenGraph\Types\Video\Other;
15+
use Astrotomic\OpenGraph\Types\Video\TvShow;
816
use Astrotomic\OpenGraph\Types\Website;
917

1018
class OpenGraph
@@ -28,4 +36,44 @@ public static function profile(?string $title = null): Profile
2836
{
2937
return Profile::make($title);
3038
}
39+
40+
public static function movie(?string $title = null): Movie
41+
{
42+
return Movie::make($title);
43+
}
44+
45+
public static function tvShow(?string $title = null): TvShow
46+
{
47+
return TvShow::make($title);
48+
}
49+
50+
public static function episode(?string $title = null): Episode
51+
{
52+
return Episode::make($title);
53+
}
54+
55+
public static function other(?string $title = null): Other
56+
{
57+
return Other::make($title);
58+
}
59+
60+
public static function album(?string $title = null): Album
61+
{
62+
return Album::make($title);
63+
}
64+
65+
public static function song(?string $title = null): Song
66+
{
67+
return Song::make($title);
68+
}
69+
70+
public static function playlist(?string $title = null): Playlist
71+
{
72+
return Playlist::make($title);
73+
}
74+
75+
public static function radioStation(?string $title = null): RadioStation
76+
{
77+
return RadioStation::make($title);
78+
}
3179
}

0 commit comments

Comments
 (0)