Skip to content
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

Enhancement Question: "New Uploads," menu item. #40

Open
madtempest opened this issue Jan 14, 2025 · 4 comments
Open

Enhancement Question: "New Uploads," menu item. #40

madtempest opened this issue Jan 14, 2025 · 4 comments

Comments

@madtempest
Copy link

Is it possible to have this plugin have an additional menu item that renders the "New Uploads," page (https://www.mixcloud.com/home/new-uploads/) from Mixcloud?

I would find myself using this plugin more if this was available as the "New Uploads," page presents the new uploads from the creators you are following. This is often new radio shows or mixes from specific creators someone might follow without having to dig through the "Following," and then "Tracks," menu items.

If it's not possible - that's all good but I figured I'd ask!

@danielvijge
Copy link
Owner

I looked at the API, and I don't believe this is available.

The /new endpoint that is mentioned in the documentation isn't working at all (for me at least). But as this is user dependant, I believe it should be under the /me endpoint. The only lists that are returned there are:

  • cloudcasts (user uploads)
  • favorites
  • feed
  • followers
  • following
  • listens
  • playlists
  • listen-later

I would have expected feed to be almost what you want (showing uploads and reports), but for me that API doesn't return any data. No idea why.

@madtempest
Copy link
Author

The documentation says: Objects in the Mixcloud API can be found by taking the URL where you would find them on the site and changing https://www.mixcloud.com/ to https://api.mixcloud.com/

or in other others https://api.mixlcloud.com/home/new-uploads would in theory work.

I'll register an app and see what comes up for myself and let you know.

Thanks for looking into this.

@danielvijge
Copy link
Owner

I did try that, but there is a user name hòme that is returned when doing those calls.

Still, of you find a way to do it with the api, i can see if i can implement it in the plugin.

@richardhenwood
Copy link

I've been looking at this feature. In my testing, 'my/feed' returns a list of the tracks that the /user/ has uploaded. I arrived at that conclusion because my list is empty, but doing something like utahsaints/feed returns results.

On the question of: Show me the latest releases from the folks I follow...

app.mixcloud.com/graphql is undocumented but appears to respond to oAuth requests. Something like this may be a start?

query FeedListPaginationQuery(
  $count: Int = 10
  $cursor: String
) {
  viewer {
    ...FeedList_viewer_latest
    id
  }
}

fragment WebUploadFeedItemRow_feedItem on UploadFeedItem {
  cloudcast {
    id
    audioType
    isPublic
    slug
    name
    description
    picture {
      urlRoot
    }
  }
  user {
    username
    displayName
  }
} 

fragment FeedItemEdge_info on FeedItemEdge {
  node {
    __typename
    ...WebUploadFeedItemRow_feedItem
    ... on Node {
      __isNode: __typename
      id
    }
  }
}

fragment FeedList_viewer_latest on Viewer {
  feed(first: $count, after: $cursor) {
    pageInfo {
      hasNextPage
      endCursor
    }
    edges {
      cursor
      ...FeedItemEdge_info
      node {
        __typename 
        ... on Node {
          __isNode: __typename
          id
        }
      }
    }
  }
}

with a variable of (for example) {'count': 10}

NOTE: I don't have a great deal of experience writing Perl LMS plugins so I'm unsure if graphql is a feasible approach.

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

No branches or pull requests

3 participants