Skip to content

Add series and collection types #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

riazaia
Copy link
Member

@riazaia riazaia commented Aug 1, 2023

Finally making this PR based on previous discussions. I made a couple of judgement calls but feel free to comment on those or anything else you disagree with.

  • removed the url property ms boba had added to currentWork because it seems redundant when you can create the URL when you need it from the current work id.
  • called the property for a collection's name the id, to keep it consistent to the way we reffer to other unique identifiers that show up on AO3, specially ones related to URLs

todo

  • add methods to scrape series and collections
  • add series and collections properties to work summary type
  • add tests for these new methods

@riazaia
Copy link
Member Author

riazaia commented Aug 2, 2023

I was looking through the rest of the code and we use collectionName when grabbing it from a url of the shape: https://archiveofourown.org/collections/YJ_Prompts/works/30216801 where in this case the variable's value would be YJ_Prompts so maybe I'll change the id property back to name?

Though I'm also the one that came up with that variable name so that just be my bias talking and other's do prefer id to refer to a collection's unique identifier.

Pls giv thoughts!

@essential-randomness
Copy link
Member

essential-randomness commented Aug 2, 2023

So, taken a look at collection here: https://archiveofourown.org/collections/YJ_Prompts

There's a different semantic between id and name. An id is a (usually unique) identifier, often for the use of software more than people. name is generally what you'd display in a UI for people to read.

In this case, I would say YJ_Prompts is the id of the collection, and Young Justice Prompt Meme its name.

@riazaia
Copy link
Member Author

riazaia commented Aug 2, 2023

In this case, I would say YJ_Prompts is the id of the collection, and Young Justice Prompt Meme its name.

@essential-randomness Yes, though interestingly and annoyingly, in the UI when you create the collection those are called 'Collection name' and 'Display title' respectively...

image

@essential-randomness
Copy link
Member

image

@essential-randomness
Copy link
Member

Ok, jokes aside, if there is any e.g. numerical id that AO3 refers to the collection with, then that should be the id. But my understanding is that the id used to identify the collection is indeed what they call "name" in their UI.

We could rename name to title though.

@enigmalea
Copy link
Member

enigmalea commented Aug 2, 2023

[Edited because Ria came to my defense.... LOL]

There's no numerical value that's exposed for id that I'm aware of. The collection name is used to identify the collection and must be unique. The display title can be anything.

I'm still leaning toward no id, collectionName, and displayTitle, if only because the people who are going to want to scrape the collections are the people who are most likely creating them, and we should try to match the terminology they're used to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants