This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn parse-platform | |
[node] | |
(xml->map node | |
{:Name assoc-text | |
:OS (assoc-as :version text) | |
:Device (assoc-as :devices #(-> % text parse-list remove-empty)) | |
:StoreRating (assoc-as :storeRating (comp parse-double text)) | |
:StoreAggregate (assoc-as :storeAggregate (comp parse-double text))})) | |
(defn parse-app | |
[node] | |
(xml->map node | |
{:Name assoc-text | |
:Category (coalesce-into :categories text) | |
:Tag (coalesce-into :tags text) | |
:AppID assoc-text | |
:Short assoc-text | |
:Long assoc-text | |
:Published assoc-text | |
:ImageURL (assoc-as :image text) | |
:Language (coalesce-into :languages text) | |
:ImageScreen (coalesce-into :screenshots text) | |
:FriendlyURL assoc-text | |
:Organization assoc-text | |
:Platform (coalesce-into :platforms parse-platform)})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment