{"id":21647465,"url":"https://github.com/fitomad/ituneskit","last_synced_at":"2025-03-20T00:58:02.822Z","repository":{"id":74267592,"uuid":"129765982","full_name":"fitomad/ituneskit","owner":"fitomad","description":"iTunes Store Seach framework. Designed with a Protocol Oriented Programming approach","archived":false,"fork":false,"pushed_at":"2018-04-17T06:34:17.000Z","size":227,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T05:09:37.787Z","etag":null,"topics":["api-client","codable","ios-swift","itunes-api","itunes-store","macos-swift","protocol-oriented","swift4"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fitomad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-16T15:32:59.000Z","updated_at":"2019-03-27T22:10:00.000Z","dependencies_parsed_at":"2023-07-12T04:45:43.104Z","dependency_job_id":null,"html_url":"https://github.com/fitomad/ituneskit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitomad%2Fituneskit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitomad%2Fituneskit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitomad%2Fituneskit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitomad%2Fituneskit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitomad","download_url":"https://codeload.github.com/fitomad/ituneskit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244531013,"owners_count":20467391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","codable","ios-swift","itunes-api","itunes-store","macos-swift","protocol-oriented","swift4"],"created_at":"2024-11-25T06:50:05.950Z","updated_at":"2025-03-20T00:58:02.806Z","avatar_url":"https://github.com/fitomad.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iTunesKit\nCliente que permite buscar en la iTunes Store. Es un framework desarrollado en Swift diseñado usando un enfoque Protocol Oriented Programming.\n\n## Diseño\nLa programación orienta a Protocolos difiere de la orientada a Objetos en que en lugar de comenzar definiendo estructura de clases usamos protocolos, pero además, se fundamenta en tres pilares:\n\n* *Herencia* de protocolos\n* *Composición* de protocolos\n* *Extensiones* de protocolos\n\n![Framework Design](https://github.com/fitomad/ituneskit/blob/master/Images/pop_design.jpeg)\n\n**Book**: Está formado por los protocolos `Track`, `Artwork` y `Sizing`\n\n**Movie**: Formado por `Track`, `DVD`, `Artwork`, `Previewing` y `Timing`\n\n**Song**: Está compuesta por `Track`, `Artwork`, `Previewing`, `Disc` y `Timing`\n\n## Ejemplos\n\nVamos a buscar un libro, concretamen Ready Player One.\n\n```swift\niTunesClient.shared.book(named: \"Ready Player One\") { (result: iTunesResult\u003cBook\u003e) -\u003e (Void) in\n\tswitch result\n\t{\n\t\tcase .success(let books):\n\t\t\tprint(\"Se han encontrado \\(books.count) libros.\")\n\n\t\t\tfor book in books\n\t\t\t{\n\t\t\t\tprint(\"# \\(book) Size: \\(book.formattedFileSize)\")\n\t\t\t}\n\n\t\tcase .error(let message):\n\t\t\tprint(message)\n\n\t\tcase .empty:\n\t\t\tprint(\"No se ha encontrado nada de nada...\")\n\t}\n}\n```\n\nPero también podemos hacer una búsqueda general en la iTunes Store, por ejemlo, vamos a ver qué libros, canciones o películas no da el término **Jobs**\n\n```swift\niTunesClient.shared.movie(named: \"Jobs\") { (result: iTunesResult\u003cTrack\u003e) -\u003e (Void) in\n\tswitch result\n\t{\n\t\tcase .success(let items):\n\t\t\tprint(\"Se han encontrado \\(items.count) productos.\")\n\n\t\t\tprint(\"Books...\")\n\t\t\tfor case let book as Book in items\n\t\t\t{\n\t\t\t\tprint(\"\\t- \\(book.trackName) by \\(book.artistName). Size: \\(book.formattedFileSize)\")\n\t\t\t}\n\n\t\t\tprint(\"Songs...\")\n\t\t\tfor case let song as Song in items\n\t\t\t{\n\t\t\t\tprint(\"\\t- \\(song.trackName) // \\(song.collectionName). Duration: \\(song.fomattedTrackTime)\")\n\t\t\t}\n\n\t\t\tprint(\"Movies...\")\n\t\t\tfor case let movie as Movie in items\n\t\t\t{\n\t\t\t\tprint(\"\\t- \\(movie.trackName) by \\(movie.collectionName). Duration: \\(movie.fomattedTrackTime)\")\n\t\t\t}\n\n\t\tcase .error(let message):\n\t\t\tprint(message)\n\n\t\tcase .empty:\n\t\t\tprint(\"No se ha encontrado nada de nada...\")\n\t}\n}\n```\n\n## Contacto\n\nPara cualquier duda, sugerencia o comentario puedes contactar conmigo en twitter [@fitomad](https://twitter.com/fitomad)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitomad%2Fituneskit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffitomad%2Fituneskit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitomad%2Fituneskit/lists"}