<commit_before>package models

import "github.com/UniversityRadioYork/myradio-go"

// PodcastModel is the model for the Podcast controller.
type PodcastModel struct {
	Model
}

// NewPodcastModel returns a new PodcastModel on the MyRadio session s.
func NewPodcastModel(s *myradio.Session) *PodcastModel {
	return &PodcastModel{Model{session: s}}
}

// GetAllPodcasts gets the data required for the Podcast controller from MyRadio.
//
// On success, it returns the podcasts and nil
// Otherwise, it returns undefined data and the error causing failure.
func (m *PodcastModel) GetAllPodcasts() (podcasts []myradio.Podcast, err error) {
	podcasts, err = m.session.GetAllPodcasts()
	if err != nil {
		return
	}

	return
}

// Get gets the data required for the Podcast controller from MyRadio.
//
// On success, it returns the users name, bio, a list of officerships, their photo if they have one and nil
// Otherwise, it returns undefined data and the error causing failure.
func (m *PodcastModel) Get(id int) (podcast *myradio.Podcast, err error) {
	podcast, err = m.session.Get(id)
	if err != nil {
		return
	}

	return
}<commit_msg>Show 10 latest podcasts on OD pages.<commit_after>package models

import "github.com/UniversityRadioYork/myradio-go"

// PodcastModel is the model for the Podcast controller.
type PodcastModel struct {
	Model
}

// NewPodcastModel returns a new PodcastModel on the MyRadio session s.
func NewPodcastModel(s *myradio.Session) *PodcastModel {
	return &PodcastModel{Model{session: s}}
}

// GetAllPodcasts gets the data required for the Podcast controller from MyRadio.
//
// On success, it returns the podcasts and nil
// Otherwise, it returns undefined data and the error causing failure.
func (m *PodcastModel) GetAllPodcasts() (podcasts []myradio.Podcast, err error) {
	//Get 10 podcasts from page 0 (the latest podcasts)
	podcasts, err = m.session.GetAllPodcasts(10, 0)
	if err != nil {
		return
	}

	return
}

// Get gets the data required for the Podcast controller from MyRadio.
//
// On success, it returns the users name, bio, a list of officerships, their photo if they have one and nil
// Otherwise, it returns undefined data and the error causing failure.
func (m *PodcastModel) Get(id int) (podcast *myradio.Podcast, err error) {
	podcast, err = m.session.Get(id)
	if err != nil {
		return
	}

	return
}
{'fraction_non_alphanumeric': 0.08947592671495526, 'fraction_numerical': 0.0034086067319982955, 'mean_word_length': 4.1154684095860565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6156389', 'n_tokens_mistral': 740, 'n_tokens_neox': 708, 'n_words': 288}