detroitledger / gnl_profile

API & data management system for the Detroit Ledger
https://www.detroitledger.org
0 stars 2 forks source link

Add news feature #121

Closed hampelm closed 8 years ago

hampelm commented 8 years ago

Allow us to store short news snippets and links associated with organizations.

Fields:

Ideally, the API endpoint for organizations would be updated to include a news property with data that looks something like this:

...
news: [{
  title: "Title",
  description: "Description...",
  link: "http://example.com/news/123",
  date: [timestamp in a standard format],
  id: ID_OF_NEWS_PIECE (nid?)
  organizations: [{  <--- Org references can come later if it's annoying
    name: "Focus:HOPE",
    id: LEDGER_ID
  },...]
}...]
...

If you add the grant relation, the grant API might also need updating to include related news items.

hampelm commented 8 years ago

Or the news endpoint can be separate from the main org endpoint. Eg it could be /orgs/123/news

bnchdrff commented 8 years ago

news added!!1 :newspaper: available on orgs, but not grants quite yet. will work on that.

bnchdrff commented 8 years ago

added news prop to grant resource.

bnchdrff commented 8 years ago

adding related grants to news items isn't super easy because the titles are just "org -> org" - we could offer a more descriptive title maybe, with the grant id & date?

hampelm commented 8 years ago

Without knowing how easy or hard it is, one idea for titles is "$150,000 from A to B, 2012-2013"

That's really long, though.

I'd be fine skipping related grants on news items for now.

jessicamcinchak commented 8 years ago

Agreed that gets lengthy fast.

Seems less important to tag related grants to news because those grants likely have said news article as their source anyways? Maybe it'd make more sense (and hopefully be easier) to work in the opposite direction -- to be able to source a grant we add to an existing news article (with a link to the Ledger news entry, rather than external page), and that'd happen on a grant-by-grant basis.

hampelm commented 8 years ago

@bnchdrff It's live on data.detroitledger.org!! Is it good for Sarah to go, or should we hold off?

bnchdrff commented 8 years ago

It's good to go!

On Sun, Feb 28, 2016 at 7:21 PM, Matt Hampel notifications@github.com wrote:

@bnchdrff https://github.com/bnchdrff It's live on data.detroitledger.org!! Is it good for Sarah to go, or should we hold off?

— Reply to this email directly or view it on GitHub https://github.com/detroitledger/gnl_profile/issues/121#issuecomment-189978517 .