Add links from DB to JSON function #12

Merged
w25tran merged 0 commits from william/regen-JSON into main 2 years ago
w25tran commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Not sure if I did this correctly.

Not sure if I did this correctly.
n3parikh (Migrated from git.uwaterloo.ca) approved these changes 2 years ago
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Looks good to me so far!

What's the format of the JSON? We want something like: [{'name': '...', 'url': ...}, ...]. I'm just a little confused because of the dict and zip call, but if it matches that, should be good to merge.

We should add some tests, but we can do that as part of a separate MR/later.

Looks good to me so far! What's the format of the JSON? We want something like: `[{'name': '...', 'url': ...}, ...]`. I'm just a little confused because of the `dict` and `zip` call, but if it matches that, should be good to merge. We should add some tests, but we can do that as part of a separate MR/later.
w25tran commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Here's the output if I print the resulting JSON:

[
    {
        "url": "http://csclub.uwaterloo.ca/",
        "name": "CS Club Website"
    },
    {
        "url": "https://www.instagram.com/uwcsclub/",
        "name": "Instagram"
    },
    {
        "url": "https://www.facebook.com/uw.computerscienceclub",
        "name": "Facebook"
    },
    {
        "url": "http://twitch.tv/uwcsclub",
        "name": "Twitch"
    },
    {
        "url": "http://bit.ly/uwcsclub-yt",
        "name": "YouTube"
    }
]
Here's the output if I print the resulting JSON: ``` [ { "url": "http://csclub.uwaterloo.ca/", "name": "CS Club Website" }, { "url": "https://www.instagram.com/uwcsclub/", "name": "Instagram" }, { "url": "https://www.facebook.com/uw.computerscienceclub", "name": "Facebook" }, { "url": "http://twitch.tv/uwcsclub", "name": "Twitch" }, { "url": "http://bit.ly/uwcsclub-yt", "name": "YouTube" } ] ```
w25tran commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

I just used the dict and zip call as a generalized way to match column names to column values.

I just used the `dict` and `zip` call as a generalized way to match column names to column values.
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Looks good to me!

Looks good to me!
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

approved this merge request

approved this merge request
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

added 4 commits

  • 817f5b53...6a3c29da - 3 commits from branch main
  • a0362b99 - Merge branch 'main' into william/regen-JSON

Compare with previous version

added 4 commits <ul><li>817f5b53...6a3c29da - 3 commits from branch <code>main</code></li><li>a0362b99 - Merge branch &#39;main&#39; into william/regen-JSON</li></ul> [Compare with previous version](/csc/linktree/-/merge_requests/7/diffs?diff_id=51175&start_sha=817f5b539ddc55efe79b517d759f85185fc88beb)

Reviewers

The pull request has been merged.
Sign in to join this conversation.
No reviewers
No Label deployment
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: old/LinkList#12
Loading…
There is no content yet.