Segment types
See original GitHub issueAs discussed earlier, there are multiple segment types besides sponsor spots. This issue tracks the API changes necessary to implement them.
There are many things that would ideally be changed, but also new features are implementable without those changes. The minimal set of changes is highlighted with Minimal change.
All renamings imply the creation of new API endpoints without removal of old ones methods
Database
- NO Rename table
sponsorTimes
intosegmentTimes
- Minimal change Add
type
ENUM column with values (to be discussed):null
– type unknown and for backwards compatibility"intro"
– for vide intros, usually appear before channel logo (not all channels have this)"sponsor"
– for currently tracked sponsors"merch"
– channel’s custom merch (not an outside sponsor)"social"
– We are on Twitter/FaceBook/etc."buttons"
– Comment!/Like!/Subscribe!"patreon"
– Only for patreon.com announcements that do not contain
Some of the categories might overlap ("sponsor"
and "merch"
; "social"
and "buttons"
and "patreon"
), but this is intentional and enables finer granularity.
API
- Minimal change To current
GET /api/postVideoSponsorTimes
addtype
which is a string (one of recognized types). - Create
GET /api/videoSegmentTimes
to be used instead ofGET /api/getVideoSponsorTimes
- It sends the same data, but with
type
.
- It sends the same data, but with
- Create
POST /api/videoSegmentTimes
to be used instead ofGET /api/postVideoSponsorTimes
- Use actual JSON instead of URL parameters, allow submitting multiple segments (for the same video). No mechanism for segment deletion yet. Schema:
userID
– same as nowvideoID
– string, same as nowsegments
– array of Objects like so:startTime
– float, in secondsendTime
– float, in secondstype
– string, one of known types
- Use actual JSON instead of URL parameters, allow submitting multiple segments (for the same video). No mechanism for segment deletion yet. Schema:
- Update
GET /api/postVideoSponsorTimes
to inserttype = "sponsor"
- Ensure
GET /api/getVideoSponsorTimes
returns only segments withtype = "sponsor"
NOTE: BEFORE MERGING:
You need to update the table to insert the type
column. Since SQLLite does not have ENUM
s, it can be TEXT
type.
ALTER TABLE sponsorTimes ADD "type" TEXT;
UPDATE sponsorTimes SET "type"="sponsor";
Issue Analytics
- State:
- Created 4 years ago
- Comments:27 (25 by maintainers)
Top Results From Across the Web
4 Types of Market Segmentation: Examples & Benefits
Learn about the 4 types of market segmentation: demographic, psychographic, geographic, and behavioral & their benefits with examples from ...
Read more >What is Market Segmentation? 4 Types & 5 Benefits
Demographic, psychographic, behavioral and geographic segmentation are considered the four main types of market segmentation, but there are also ...
Read more >Different Types of Consumer Segmentation | Audiense
Types of Consumer Segmentation · Demographic & Socioeconomic Segmentation · Geographic Segmentation · Behavioural Segmentation · Psychographic Segmentation · Social ...
Read more >Market Segmentation: Definition, Example, Types, Benefits
Types of segmentation include homogeneity, which looks at a segment's common needs, distinction, which looks at how the particular group stands ...
Read more >4 Key Types of Market Segmentation: Everything You Need to ...
There are four key types of market segmentation that you should be aware of, which include demographic, geographic, psychographic, and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, it has been 5 days since I posted this and all bilke-shedding is over, so I’ll implement this over the weekend.
Offtopic is just too subjective for something like this