Giter VIP home page Giter VIP logo

randomuser.me-node's Introduction

Randomuser.me-Node

About

This is the source code that powers the randomuser.me User Generator.

Our goal is to have a very diverse database that consists of data unique to different nationalities. While some places might have an SSN or their phone number might be formatted a certain way, other places usually follow a completely different set of rules.

Help us make the Random User Generator better by contributing to our database and teaching us the proper way of formatting data for different nationalities.

Guidelines

If you would like to help contribute data specific to a region, please keep these few rules in mind:

  1. Only add new nat data to the api/.nextRelease directory...

  2. Please keep all of the data organized.

    • Keep US data in the US directory, AU in the AU directory, etc.
  3. No duplicates. Make sure that the data you are adding isn't already on the list.

    • An easy way to remove duplicates from your file and sort:
sort -u <file> -o <file>

4. Please don't submit requests that say "make this nationality". We will accept helpful contributions, but not orders :)

Requirements

Node v9.0.0+ MongoDB

How to use

  1. Run npm install

  2. Run npm run build to build views and minify js/css

  3. Run npm test and verify all tests pass

  4. Start the server with npm start

What if I want to add a new nationality?

Go ahead! We will gladly accept new regions if they follow the guidelines above. Just place your files in a new directory in the api/.nextRelease/data folder with the appropriate 2 letter ISO Country Code (http://countrycode.org). Follow the format of the US folder for reference.

How to contact us

If you have any questions, feel free to ask us on our Twitter page @randomapi.

randomuser.me-node's People

Contributors

atnbueno avatar bendikrb avatar brianlu2610 avatar bsoyka avatar campbehr avatar deisterhold avatar dvdmunckhof avatar ejje101 avatar fiznool avatar fluecke avatar j4ln avatar kalebscholes avatar kattixie avatar keitharm avatar lionep avatar marcosalfredo-visma avatar martignoni avatar martinduparc avatar mlevin2 avatar olesh0 avatar pashachee avatar pmz94 avatar robinwpollard avatar robmathers avatar stokicdusan avatar thoskn avatar tuliocasagrande avatar wesssel avatar zanderbrown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

randomuser.me-node's Issues

standardize fields

Fields currently differ quite a bit between nationalities.

Need to standardize the names

Implement client rate limiter

Concurrent requests limiter is implemented in NGINX (currently 10 requests/second), but that won't prevent HUGE requests of 10 @ 5,000 users per request from crashing the server.

Make it so that there is a limit of users to be generated on a per ip basis.

High quality Profile Picture

Hi,
You did a great job but I stuck on a problem...Actually am creating an application where the people's profile picture should come with a large size but now the scenario is the image is pixelated, am already using large version, can you please increase the quality at least 600x600 pixel ?

best regards,
Ajoy Karmakar

Optimize Generator

Currently, generator is pretty slow...

Investigate ways to improve performance

Make CLI script

CLI script...possibly NPM module for easy user generation locally

Space in email address

I've had email addresses with spaces multiple times using the API. For example using this request:
https://randomuser.me/api/?results=1&nat=nl&seed=25f27b301463f0a5

{
  "results": [
    {
      "gender": "female",
      "name": {
        "title": "miss",
        "first": "tammy",
        "last": "van de bovenkamp"
      },
      "location": {
        "street": "6986 stadsbuitengracht",
        "city": "montferland",
        "state": "limburg",
        "postcode": 59032
      },
      "email": "tammy.vande [email protected]",
      "login": {
        "username": "heavybear861",
        "password": "goober",
        "salt": "9yRh9EL8",
        "md5": "be6cd6f72540ce287d9f634db614ba8e",
        "sha1": "72034f0355f89c735360796dce28b44d23c66a7d",
        "sha256": "17d517631b157a260e1ba800bf9a39037b681817e3e1503fdda9fc2b90623f71"
      },
      "registered": 1216056241,
      "dob": 86315672,
      "phone": "(813)-966-4527",
      "cell": "(648)-084-0047",
      "id": {
        "name": "BSN",
        "value": "25864257"
      },
      "picture": {
        "large": "https://randomuser.me/api/portraits/women/78.jpg",
        "medium": "https://randomuser.me/api/portraits/med/women/78.jpg",
        "thumbnail": "https://randomuser.me/api/portraits/thumb/women/78.jpg"
      },
      "nat": "NL"
    }
  ],
  "info": {
    "seed": "25f27b301463f0a5",
    "results": 1,
    "page": 1,
    "version": "1.0"
  }
}

By the way, awesome service!

Feature Proposal: timezone Field In the Data

Hey, guys, Awesome service!

I don't know if this is the right place for suggestions, but I think the data will benefit from a timezone field (maybe as a part of location field?)

Also, how about adding gis coordinates in that object as well?

Thanks!

Documentation displays invalid JSON

Perhaps a bit trivial, but the documentation at https://randomuser.me/documentation displays invalid JSON. It's missing the first double quote for the values: "property": value",:

{
  "results": [
    {
      "gender": male",
      "name": {
        "title": mr",
        "first": samuel",
        "last": ross"
      },
      "location": {
        "street": 5592 pockrus page rd",
        "city": santa ana",
        "state": oregon",
        "postcode": 69974
      },
      "email": [email protected]",
      "login": {
        "username": silverwolf434",
        "password": blackjac",
        "salt": d14iEZQT",
        "md5": 261a57061d35918f5c3ef7f90f4f2a80",
        "sha1": c330ad8c974ab9982622d5d5506cfed4886a79ab",
        "sha256": 8ca4a1ca48975a69bd829de61298cd6a950dede740d4c0e755d07ee4cfc06fa5"
      },
      "registered": 1155461743,
      "dob": 1078494582,
      "phone": (179)-102-8139",
      "cell": (107)-396-0688",
      "id": {
        "name": SSN",
        "value": 476-30-9095"
      },
      "picture": {
        "large": https://randomuser.me/api/portraits/men/80.jpg",
        "medium": https://randomuser.me/api/portraits/med/men/80.jpg",
        "thumbnail": https://randomuser.me/api/portraits/thumb/men/80.jpg"
      },
      "nat": US"
    }
  ],
  "info": {
    "seed": 705567e86a824a27",
    "results": 1,
    "page": 1,
    "version": 1.0"
  }
}

Skip the Arabic names

I don't want to receive the Arabic names.
I have set https://randomuser.me/api/?results=15&?nat=us , but still showing up.
Did something I miss?
Thank you.

Bigger images?

Apparently even the big image is only a 128x128 thumbnail - is there a way to retrieve the full size image of a user?

Invalid date format

The date format in the dob field returned by this API is unsupported by Safari, in which it says "Invalid Date" after passing it to the JavaScript Date constructor. Currently, it's a string formatted like "1983-07-14 07:29:45". In my opinion, this API should leave the date formatting up to the consumer, and since this API currently returns the date as a string, it inherently comes with its own formatting.

I propose that to mitigate this, the dob field should be either a UNIX timestamp, or potentially a UNIX timestamp with millisecond resolution. UNIX timestamps are a common, well-known, and widely supported method of representing a specific moment in time. However, JavaScript's Date constructor takes a UNIX timestamp with millisecond resolution (instead of the common second resolution), so a decision would have to be made as to if JavaScript consumers must multiply the result by 1000 before passing it to the Date constructor, or if consumers that support normal UNIX timestamps must divide by 1000 before constructing their respective representation of a moment in time.

Regardless, I think that this field should be changed to either a standard UNIX timestamp or one with millisecond resolution so that it's easier for consumers to parse and easier for consumers to format to their users' respective preferences and locale

It requires Access-Control-Allow-Origin for more than 4 concurrent requests

It does work well for under 4 persons data requested at concurrent

for (let i = 0; i < 4; i++) {
      const promise = this.http.get<any>('https://randomuser.me/api/').toPromise();
      promises.push(promise);
    }
    Promise.all(promises).then(function(values) {
      console.log(values);
    });

But it doesn't work if it over 4 persons data

for (let i = 0; i < 20; i++) {
      const promise = this.http.get<any>('https://randomuser.me/api/').toPromise();
      promises.push(promise);
    }
    Promise.all(promises).then(function(values) {
      console.log(values);
    });

https://stackoverflow.com/questions/50145612/promise-all-get-access-control-allow-origin-only-when-more-than-4-promises-use

Add download flag

Add dl & download flag to automagically start downloads for the API results

Add Description

Hello there,
This is not an issue it's just a suggestion, can you please add a description of the users, so when we designers fill the data with awesome randomuser API..there is a little thing we need that a description, that currently missing...If you guys add this features then it will be more usable.
Best Regards,
Ajoy Karmakar

Add pretty option for JSON

JSON is currently compressed with no whitespace for smallest transfer size.

Add pretty option so that humans can read it if they want to.

Add timezone

Is it possible to add user's timezone in the "dob" and "registered" fields based on birth location?

Thanks

How to add new data

I would like to open a PR adding my name & 'city' to the database however the README is unclear as to how to do this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.