{"action":"opened","issue":{"url":"https://api.github.com/repos/omeka-s-modules/Omeka2Importer/issues/3","labels_url":"https://api.github.com/repos/omeka-s-modules/Omeka2Importer/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/omeka-s-modules/Omeka2Importer/issues/3/comments","events_url":"https://api.github.com/repos/omeka-s-modules/Omeka2Importer/issues/3/events","html_url":"https://github.com/omeka-s-modules/Omeka2Importer/issues/3","id":95709119,"number":3,"title":"Refactor for generalization","user":{"login":"patrickmj","id":153262,"avatar_url":"https://avatars.githubusercontent.com/u/153262?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickmj","html_url":"https://github.com/patrickmj","followers_url":"https://api.github.com/users/patrickmj/followers","following_url":"https://api.github.com/users/patrickmj/following{/other_user}","gists_url":"https://api.github.com/users/patrickmj/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickmj/subscriptions","organizations_url":"https://api.github.com/users/patrickmj/orgs","repos_url":"https://api.github.com/users/patrickmj/repos","events_url":"https://api.github.com/users/patrickmj/events{/privacy}","received_events_url":"https://api.github.com/users/patrickmj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/omeka-s-modules/Omeka2Importer/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-17T17:56:21Z","updated_at":"2015-07-17T17:56:21Z","closed_at":null,"body":"To see if it makes sense to generalize the connectors/importers into one module, as this gets wrapped up look to see what functions in Import make sense generally in the other modules as part of an abstract class or as part of an interface\r\n\r\nPossible examples:\r\n* `buildResourceJson` -- the full JSON to submit to the API for 1 new Resource\r\n* `buildMediaJson` -- the `o:media` part of a Resource\r\n* `buildPropertiesJson` -- the properties part of a Resource\r\n* `prepareTermIdMap` -- cache a map between qnames and property IDs\r\n* `getPropertyId` -- dig up from the cache\r\n* `importItems` -- do a call to get remote content to loop through and build Items for import or update\r\n* `isImported` -- check whether remote content has already been imported\r\n\r\n\r\n"}}