Continuing with techniques from the “Acme” project, another ongoing feed I implemented was import from a JSON feed protected by OAuth2 authentication into “doctor” nodes. Let’s look first at the community contributions we needed to implement this.
Continuing with techniques from the “Acme” project, the location content type had an address field and a geofield, with field_geofield configured to automatically determine latitude and longitude from the associated field_address - a fact I was initially unaware of. Our source data contained latitude and longitude already, which I mapped directly in the migration:
Frequently, there may be parts of a migration configuration which shouldn’t be hard-coded into your YAML file - some configuration may need to be changed periodically, some may vary according to environment (for example, a dev environment may access a dev or test API endpoint, while prod needs to access a production endpoint), or you may need a password or other credentials to access a secure endpoint (or for a database source which you can’t put into settings.php). You may also need to upload a data file for input into your migration.
Past projects of mine
XML -> Mobile-compliant XHTML
I produced a mobile-compatible website for delivering 2008 U.S. Presidential election results to hand-held devices. This involved modifying the Drupal FeedAPI module (at that time still in beta) to read custom fields in addition to standard RSS fields (patch submitted).
As a follow-up project, in two days I created a system to take XML feeds of raw election data and produce mobile-compatible XHTML pages to present the results, for live updates on Super Tuesday. This system included a templating system so the client could easily style it to their own needs (they reported it took half an hour with my delivered system to complete the theming and customization), and has remained in operation through subsequent primary elections.