pyytdata icon indicating copy to clipboard operation
pyytdata copied to clipboard

Improve the overall design of the package

Open Agent-Hellboy opened this issue 1 year ago • 5 comments

The public interface of the package is not friendly, we should decide on the APIs which should be public and private and currently some public APIs( an example API is vid=obj.get_videoinfo()) are returning a list of objects which should not be expected behavior.

For first-time contributors, look into the design patterns from https://refactoring.guru/design-patterns and try to grab some ideas.

Agent-Hellboy avatar Oct 02 '22 07:10 Agent-Hellboy

Hello, I'd like to work on this issue, can you please assign me?

ethmtrgt avatar Oct 12 '22 08:10 ethmtrgt

Sure, I hope you will share your approach first, before going for the implementation.

Agent-Hellboy avatar Oct 12 '22 09:10 Agent-Hellboy

Hello, I sent you an email last week. Could you please check?

ethmtrgt avatar Oct 21 '22 09:10 ethmtrgt

sorry, let me check.

Agent-Hellboy avatar Oct 21 '22 12:10 Agent-Hellboy

Hi @ethmtrgt, thanks for showing interest.

currently some public APIs( an example API is vid=obj.get_videoinfo()) are returning a list of objects which should not be expected behavior.

This is done, we are not returning a list of objects now, we are returning the generator object.

I could suggest adding new APIs to give missing metadata of the video(currently I guess we have APIs to give metadata of videos only, we could provide an API that takes channel id or name and provide metadata), then you will get some ideas to tweak the design.

here is the API Reference https://developers.google.com/youtube/v3/docs

currently, we query this class internally only to get channel info https://github.com/Agent-Hellboy/pyytdata/blob/3ce31fc200ddec2b42c88b9edca038240e96b3f9/pyytdata/util/channelinfo.py#L6

Agent-Hellboy avatar Oct 21 '22 13:10 Agent-Hellboy