Latest 0.2.2
Homepage https://github.com/carlosmouracorreia/AlbumFolksFetcher
License MIT
Platforms ios 9.0
Dependencies Alamofire, AlamofireObjectMapper, AlamofireImage, DynamicBlurView
Authors

CI Status
Version
License
Platform

This library allows for plug-n-play track (album information) download providing a simple UI/interface for search/fetch. Its inspired on this original project (persistent album info storage)

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

To Use – API_KEY

Although there’s a filled AF_LASTFM_API_KEY_VALUE for the example project you should provide your own when installing the Pod. Get it here

Then simply change the global constant AF_LASTFM_API_KEY_VALUE.

Installation

AlbumFolks is available through (not yet) CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'AlbumFolks'

Simple Usage

Consult Example ViewController here.


 AF_LASTFM_API_KEY_VALUE = "YOUR API KEY"

 @IBAction func searchClicked(_ sender: UIBarButtonItem) {
        let albumFolksController = AlbumFolksController(passingDelegate: self)
        self.present(albumFolksController, animated: true, completion: nil)
    }

extension ViewController : TrackChosenDelegate {
    func trackChoosen(_ track: TrackViewPopulator) {

        if let image = track.album.inMemoryImage {
            self.albumImage.image = image
        }

        self.trackName.text = "Track: (track.number) - (track.title)"

        self.trackLength.text = "Track Length: (track.lengthStatic ?? "No Info")"

        self.album.text = "Album: (track.album.name)"

        self.artist.text = "Artist: (track.album.artist.name)"

        self.tags.text = "Tags: (track.album.tags ?? "No Info")"
    }
}

Configurable Parameters

All configurable parameters start with the prefix AF. You can make use of these to tune useful parameters.

Search (SearchArtistsVC)

/* When not searching */
public var AF_MAX_RECENT_SEARCH_ENTRIES : Int

/* I recommend 2,3 minimum */
public var AF_MIN_SEARCH_QUERY_LENGTH : Int

/* Limit for the API Query - Limit number to display on the screen */
public var AF_MAX_SEARCH_RESULTS : Int

/* Last FM API present a lot of irrelevant pages w/unadmissible content... */
public var AF_MAX_PAGE_NUMBER : Int

/* load less pages as you write more content */
public var AF_PAGE_DECREMENT_FACTOR_PER_EXTRA_CHAR : Int

Artist Albums (ArtistAlbumsVC)


/* After this threshold user gets a link displayed to open a webbrowser  */
public var AF_MAX_ALBUMS_TO_SHOW : Int

Dependencies

Pods

  • Alamofire
  • AlamofireObjectMapper (and ObjectMapper)
  • AlamofireImage
  • PopupDialog (Directly inserted into AlbumFolks)

Bridging Code (Copied Objective-C)

  • UIScrollView+InfiniteScroll

Testing

AlbumVCEntryPointsTests.swift – Data flow testing corresponding to the core user interaction with the App i.e, visualize albums either from the API or saved.

LaunchAppTests.swift – UI Testing

Consult UI Testing implementation details here

Author

carlosmouracorreia, [email protected]

I’m also on Twitter – twitter.com/correiask8

License

AlbumFolks is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AlbumFolks",
    "version": "0.2.2",
    "summary": "Track information fetcher from LastFM API.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/carlosmouracorreia/AlbumFolksFetcher",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "carlosmouracorreia": "[email protected]"
    },
    "source": {
        "git": "https://github.com/carlosmouracorreia/AlbumFolksFetcher.git",
        "tag": "0.2.2"
    },
    "social_media_url": "https://twitter.com/correiask8",
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.0",
    "source_files": "AlbumFolks/Classes/**/*",
    "resource_bundles": {
        "AlbumFolks": [
            "AlbumFolks/Assets/*",
            "AlbumFolks/Assets/Main.storyboard",
            "AlbumFolks/Assets/AlbumCell.xib",
            "AlbumFolks/Assets/ArtistCell.xib",
            "AlbumFolks/Assets/ArtistInfoHeaderCell.xib"
        ]
    },
    "dependencies": {
        "Alamofire": [],
        "AlamofireObjectMapper": [],
        "AlamofireImage": [],
        "DynamicBlurView": [
            "~> 2.0"
        ]
    }
}

Pin It on Pinterest

Share This