question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

As 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 into segmentTimes
  • 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 add type which is a string (one of recognized types).
  • Create GET /api/videoSegmentTimes to be used instead of GET /api/getVideoSponsorTimes
    • It sends the same data, but with type.
  • Create POST /api/videoSegmentTimes to be used instead of GET /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 now
      • videoID – string, same as now
      • segments – array of Objects like so:
        • startTime – float, in seconds
        • endTime – float, in seconds
        • type – string, one of known types
  • Update GET /api/postVideoSponsorTimes to insert type = "sponsor"
  • Ensure GET /api/getVideoSponsorTimes returns only segments with type = "sponsor"

NOTE: BEFORE MERGING:

You need to update the table to insert the type column. Since SQLLite does not have ENUMs, it can be TEXT type.

ALTER TABLE sponsorTimes ADD "type" TEXT;
UPDATE sponsorTimes SET "type"="sponsor";

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:27 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
bershanskiycommented, Sep 1, 2019

Ok, it has been 5 days since I posted this and all bilke-shedding is over, so I’ll implement this over the weekend.

0reactions
ajayyycommented, Feb 5, 2020

Offtopic is just too subjective for something like this

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found