aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-04-13Output a feed to STDOUT when running the executableTeddy Wing
* Add a new module that contains a "main" library function that does the integration for generating the feed and outputting it to STDOUT. * Call this function from `main()` and have it output a real feed.
2018-04-13meetup(find_upcoming_events): Make this function actually do somethingTeddy Wing
Eventually, I want this function to make a request to the Meetup API and return a `Vec` of `Event`s. For now, though, so we can test things out, use our test JSON file instead of a real web request.
2018-04-13meetup_rss: Add a `write` function to write a channel to STDOUTTeddy Wing
2018-04-13meetup(generate): Improve test and take a reference argumentTeddy Wing
* Take a `Vec` reference instead of an object. This is the result of messing around with calling the function in the test. * Update the test to actually make assertions on the result of the function.
2018-04-13Add a function to build an RSS `Channel` object from a list of `Event`sTeddy Wing
This uses the RSS crate to build a new channel with items corresponding to the given `Event`s. It needs to be fleshed out a little, but this is the basic idea.
2018-04-13Add 'rss' crateTeddy Wing
2018-04-13meetup(parse_json): Align test and test dataTeddy Wing
* Add an additional `Event` to the list of expected events to give us more than one to test with. * Remove all but the first two events from the JSON test data so we don't have to reproduce all of those events in our test code.
2018-04-13meetup(parse_json): Return a Vec of EventsTeddy Wing
* Derive `Deserialize` on our `Event` type * Use Serde to parse a `Vec` of `Event`s that we can return from the function * Return a `Result` from the function to handle Serde errors
2018-04-13meetup: Add 'serde' and 'serde_derive' cratesTeddy Wing
So we can derive `Deserialize` on our `Event` type.
2018-04-13meetup--find-upcoming_events.json: Escape double quotesTeddy Wing
A bunch of the descriptions had double quotes in them (`"`) that weren't escaped. Escape these to make the JSON valid.
2018-04-13Ideas for functions to extract `Event`s from JSONTeddy Wing
Add a couple function skeletons. Write the beginning of a test for the function that parses a JSON string to a list of `Event`s. In order to do the test, needed to derive `Debug` and `PartialEq` on `Event`.
2018-04-12meetup: Create `Event` structTeddy Wing
Include some fields that seem interesting. Also leave a note that we'll want to create a new struct for `Venue` because this is a sub hash in the JSON response.
2018-04-12meetup: Add 'serde_json' crateTeddy Wing
For deserialising JSON from the API to a struct.
2018-04-12Add some test JSON from the Meetup APITeddy Wing
This comes from: https://api.meetup.com/find/upcoming_events?&sign=true&photo-host=public&page=20 Grabbed from the browser API console. We'll use this for writing unit tests.
2018-04-12Make `meetup-api-token` a required argument, print its valueTeddy Wing
Use `reqopt` since this is a required option. Since the `opts.parse` call will catch it if it isn't present earlier in the `main` function, just unwrap it when extracting it.
2018-04-12Print Getopts errors with a newlineTeddy Wing
2018-04-12Parse command line arguments and add help outputTeddy Wing
Include an option to pass a Meetup.com API token (not saved yet).
2018-04-12Cargo.toml: Add 'getopts'Teddy Wing
For command line argument parsing.
2018-04-12Add a "meetup" library crate to communicate with the Meetup APITeddy Wing
2018-04-12Initial commit. Generated Rust v1.25.0 project.Teddy Wing
Generated with: $ cargo new --bin meetup-find-events-rss