Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot show stars/1 #22

Open
zniazi opened this issue Nov 10, 2014 · 9 comments
Open

Cannot show stars/1 #22

zniazi opened this issue Nov 10, 2014 · 9 comments
Labels

Comments

@zniazi
Copy link
Contributor

zniazi commented Nov 10, 2014

I pushed code near the end of Saturday that fixes this and shows /stars/1 or constellations/1 etc. Please check that push.

@surenm
Copy link
Member

surenm commented Nov 10, 2014

@zniazi Can you please raise a pull request with the appropriate commits?

@zniazi
Copy link
Contributor Author

zniazi commented Nov 10, 2014

Yes, will submit it later

Sent from my iPhone

On Nov 10, 2014, at 2:41 PM, Surendran Mahendran [email protected] wrote:

@zniazi Can you please raise a pull request with the appropriate commits?


Reply to this email directly or view it on GitHub.

@nicholalexander
Copy link
Contributor

@zniazi what does stars/1 mean? we are currently only referencing the stars resource by the label. what is 1 in this context?

@zniazi
Copy link
Contributor Author

zniazi commented Nov 12, 2014

Oh I see, I meant to reference them by their id. I feel like developers are used to that. Especially as these stars have many associations to other objects.

Sent from my iPhone

On Nov 12, 2014, at 12:01 PM, nichol alexander [email protected] wrote:

@zniazi what does stars/1 mean? we are currently only referencing the stars resource by the label. what is 1 in this context?


Reply to this email directly or view it on GitHub.

@nicholalexander
Copy link
Contributor

interesting - i think the record id is a dangerous thing to correlate to the star resource because the id could be something different depending on the database used and it is not nessecarily the identifying element of a given resource. perhaps with constellations it is different but i think stars should definitely be referenced by their label... maybe.

@surenm
Copy link
Member

surenm commented Nov 12, 2014

In some senses the label is the id here. We need to add unique key to the label in the database.

On 12-Nov-2014, at 1:37 pm, nichol alexander [email protected] wrote:

interesting - i think the record id is a dangerous thing to correlate to the star resource because the id could be something different depending on the database used and it is not nessecarily the identifying element of a given resource. perhaps with constellations it is different but i think stars should definitely be referenced by their label... maybe.


Reply to this email directly or view it on GitHub.

@nicholalexander
Copy link
Contributor

right, the label is the id - that's what i was going for. the uniqueness
on the label is just doing an add_index on the label column, yes?

On Wed, Nov 12, 2014 at 1:41 PM, Surendran Mahendran <
[email protected]> wrote:

In some senses the label is the id here. We need to add unique key to the
label in the database.

On 12-Nov-2014, at 1:37 pm, nichol alexander [email protected]
wrote:

interesting - i think the record id is a dangerous thing to correlate to
the star resource because the id could be something different depending on
the database used and it is not nessecarily the identifying element of a
given resource. perhaps with constellations it is different but i think
stars should definitely be referenced by their label... maybe.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub
#22 (comment)
.

@zniazi
Copy link
Contributor Author

zniazi commented Nov 12, 2014

Sounds good to me. The label if unique can serve as the id. One thing to
consider down the road is that it may get annoying for developers who work
with specific stars to reference them by long labels. But we should move
forward by making labels unique and updating the documentation so that that
is clear to developers.

On Wed, Nov 12, 2014 at 1:47 PM, nichol alexander [email protected]
wrote:

right, the label is the id - that's what i was going for. the uniqueness
on the label is just doing an add_index on the label column, yes?

On Wed, Nov 12, 2014 at 1:41 PM, Surendran Mahendran <
[email protected]> wrote:

In some senses the label is the id here. We need to add unique key to the
label in the database.

On 12-Nov-2014, at 1:37 pm, nichol alexander <[email protected]

wrote:

interesting - i think the record id is a dangerous thing to correlate
to
the star resource because the id could be something different depending
on
the database used and it is not nessecarily the identifying element of a
given resource. perhaps with constellations it is different but i think
stars should definitely be referenced by their label... maybe.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub
<
#22 (comment)

.


Reply to this email directly or view it on GitHub
#22 (comment)
.

@nicholalexander
Copy link
Contributor

cool!

On Wed, Nov 12, 2014 at 2:09 PM, Zak Niazi [email protected] wrote:

Sounds good to me. The label if unique can serve as the id. One thing to
consider down the road is that it may get annoying for developers who work
with specific stars to reference them by long labels. But we should move
forward by making labels unique and updating the documentation so that
that
is clear to developers.

On Wed, Nov 12, 2014 at 1:47 PM, nichol alexander <
[email protected]>
wrote:

right, the label is the id - that's what i was going for. the uniqueness
on the label is just doing an add_index on the label column, yes?

On Wed, Nov 12, 2014 at 1:41 PM, Surendran Mahendran <
[email protected]> wrote:

In some senses the label is the id here. We need to add unique key to
the
label in the database.

On 12-Nov-2014, at 1:37 pm, nichol alexander <
[email protected]

wrote:

interesting - i think the record id is a dangerous thing to
correlate
to
the star resource because the id could be something different
depending
on
the database used and it is not nessecarily the identifying element of
a
given resource. perhaps with constellations it is different but i
think
stars should definitely be referenced by their label... maybe.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub
<

#22 (comment)

.

Reply to this email directly or view it on GitHub
<
https://github.com/HacktheUniverse/star-api/issues/22#issuecomment-62769639>

.

Reply to this email directly or view it on GitHub
#22 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants